Wraps the translatable page sections into a message group. More...
Public Member Functions | |
__construct ( $id, $title) | |
getSourceLanguage () | |
Returns language code depicting the language of source text. | |
getTitle () | |
getDefinitions () | |
makeGroupKeys (array $keys) | |
getLabel (IContextSource $context=null) | |
Overriding the getLabel method and deriving the label from the title. | |
clearCaches () | |
Clear caches to avoid stale data. | |
load ( $code) | |
Returns a list of messages in a given language code. | |
getMessage ( $key, $code, $flags=self::READ_LATEST) | |
Returns of stored translation of message specified by the $key in language code $code. | |
getValidator () | |
getInsertablesSuggester () | |
getDescription (IContextSource $context=null) | |
Returns a longer description about the group. | |
Public Member Functions inherited from MessageGroupOld | |
setLabel ( $value) | |
getId () | |
setId ( $value) | |
getNamespace () | |
Get the namespace where all the messages of this group belong. | |
setNamespace ( $ns) | |
Set the namespace where all the messages of this group belong. | |
setDescription ( $value) | |
getIcon () | |
Returns an icon for this message group if any. | |
isMeta () | |
getMangler () | |
getUniqueDefinitions () | |
This function can be used for meta message groups to list their "own" messages. | |
getKeys () | |
@inheritDoc | |
getMessage ( $key, $code) | |
Returns of stored translation of message specified by the $key in language code $code. | |
getMessageFile ( $code) | |
Returns path to the file where translation of language code $code are. | |
getPath () | |
getMessageFileWithPath ( $code) | |
getSourceFilePath ( $code) | |
initCollection ( $code, $unique=false) | |
Creates a new MessageCollection for this group. | |
exists () | |
Can be overwritten to return false if something is wrong. | |
getTags ( $type=null) | |
Returns message tags. | |
getMessageGroupStates () | |
Get the message group workflow state configuration. | |
getTranslatableLanguages () | |
@inheritDoc | |
getTranslationAids () | |
List of available message types mapped to the classes implementing them. | |
getSupportConfig () | |
Gets support URL defined for the group if any. | |
Public Member Functions inherited from MessageGroup | |
initCollection ( $code) | |
Initialises a message collection with the given language code, message definitions and message tags. | |
Protected Attributes | |
$title | |
$namespace = NS_TRANSLATIONS | |
$definitions | |
Only used for caching to avoid repeating database queries for example during message index rebuild. | |
Protected Attributes inherited from MessageGroupOld | |
$label = 'none' | |
Human-readable name of this group. | |
$id = 'none' | |
Group-wide unique id of this group. | |
$namespace = NS_MEDIAWIKI | |
The namespace where all the messages of this group belong. | |
$description = null | |
Holds description of this group. | |
$meta = false | |
Meta groups consist of multiple groups or parts of other groups. | |
$mangler = null | |
To avoid key conflicts between groups or separated changed messages between branches one can set a message key mangler. | |
$messages = [] | |
All the messages for this group, by language code. | |
Additional Inherited Members | |
Static Public Member Functions inherited from MessageGroupOld | |
static | normaliseKeys ( $array) |
Protected Member Functions inherited from MessageGroupOld | |
isSourceLanguage ( $code) | |
Static Protected Member Functions inherited from MessageGroupOld | |
static | addContext (Message $message, IContextSource $context=null) |
Wraps the translatable page sections into a message group.
Definition at line 22 of file WikiPageMessageGroup.php.
WikiPageMessageGroup::__construct | ( | $id, | |
$title ) |
string | $id | |
Title | string | $title |
Definition at line 32 of file WikiPageMessageGroup.php.
WikiPageMessageGroup::clearCaches | ( | ) |
Clear caches to avoid stale data.
For example JobQueue can run for a longer time, and stale definitions would cause the total number of messages to be incorrect.
Definition at line 119 of file WikiPageMessageGroup.php.
WikiPageMessageGroup::getDefinitions | ( | ) |
Reimplemented from MessageGroupOld.
Definition at line 57 of file WikiPageMessageGroup.php.
WikiPageMessageGroup::getDescription | ( | IContextSource | $context = null | ) |
Returns a longer description about the group.
Description can use wikitext. Parameter $context was added in 2012-10-22.
IContextSource | null | $context | Context can be used by subclasses to provide translated descriptions, for example. |
Reimplemented from MessageGroupOld.
Definition at line 187 of file WikiPageMessageGroup.php.
WikiPageMessageGroup::getInsertablesSuggester | ( | ) |
Definition at line 183 of file WikiPageMessageGroup.php.
WikiPageMessageGroup::getLabel | ( | IContextSource | $context = null | ) |
Overriding the getLabel method and deriving the label from the title.
Mainly to reduce the amount of data stored in the cache.
IContextSource | null | $context |
Reimplemented from MessageGroupOld.
Definition at line 107 of file WikiPageMessageGroup.php.
WikiPageMessageGroup::getMessage | ( | $key, | |
$code, | |||
$flags = self::READ_LATEST ) |
Returns of stored translation of message specified by the $key in language code $code.
string | $key | Message key |
string | $code | Language code |
int | $flags | READ_* class constant bitfield |
Definition at line 140 of file WikiPageMessageGroup.php.
WikiPageMessageGroup::getSourceLanguage | ( | ) |
Returns language code depicting the language of source text.
Reimplemented from MessageGroupOld.
Definition at line 37 of file WikiPageMessageGroup.php.
WikiPageMessageGroup::getTitle | ( | ) |
Definition at line 42 of file WikiPageMessageGroup.php.
WikiPageMessageGroup::getValidator | ( | ) |
Reimplemented from MessageGroupOld.
Definition at line 173 of file WikiPageMessageGroup.php.
WikiPageMessageGroup::load | ( | $code | ) |
Returns a list of messages in a given language code.
For some groups that list may be identical with the translation in the wiki. For other groups the messages may be loaded from a file (and differ from the current translations or definitions).
string | $code |
Reimplemented from MessageGroupOld.
Definition at line 123 of file WikiPageMessageGroup.php.
WikiPageMessageGroup::makeGroupKeys | ( | array | $keys | ) |
|
protected |
Only used for caching to avoid repeating database queries for example during message index rebuild.
Definition at line 54 of file WikiPageMessageGroup.php.
|
protected |
Definition at line 26 of file WikiPageMessageGroup.php.
|
protected |
Definition at line 24 of file WikiPageMessageGroup.php.