Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
MessagePrefixMessageGroup Class Reference

Contains an unmanaged message group for fetching stats using message prefixes. More...

Inheritance diagram for MessagePrefixMessageGroup:
WikiMessageGroup MessageGroupOld MessageGroup

Public Member Functions

 setLanguage ( $code)
 
 getId ()
 
 getLabel (IContextSource $context=null)
 
 getDescription (IContextSource $context=null)
 Returns a longer description about the group.
 
 getDefinitions ()
 Fetch definitions from database.
 
 getValidator ()
 Returns a message validator object or null.
 
- Public Member Functions inherited from WikiMessageGroup
 __construct ( $id, $source)
 
 getSourceLanguage ()
 Defaults to wiki content language.
 
 getMessage ( $key, $code)
 Returns of stored translation of message specified by the $key in language code $code.
 
- Public Member Functions inherited from MessageGroupOld
 setLabel ( $value)
 
 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 ()
 
 load ( $code)
 Returns a list of messages in a given language code.
 
 getUniqueDefinitions ()
 This function can be used for meta message groups to list their "own" messages.
 
 getKeys ()
 @inheritDoc
 
 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

 $language
 
- Protected Attributes inherited from WikiMessageGroup
 $source
 
- 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)
 

Detailed Description

Contains an unmanaged message group for fetching stats using message prefixes.

Author
Abijeet Patro
Since
2023.02 @license GPL-2.0-or-later

Definition at line 11 of file MessagePrefixMessageGroup.php.

Constructor & Destructor Documentation

◆ __construct()

MessagePrefixMessageGroup::__construct ( )

Definition at line 14 of file MessagePrefixMessageGroup.php.

Member Function Documentation

◆ getDefinitions()

MessagePrefixMessageGroup::getDefinitions ( )

Fetch definitions from database.

Returns
array Array of messages keys with definitions.

Reimplemented from WikiMessageGroup.

Definition at line 34 of file MessagePrefixMessageGroup.php.

◆ getDescription()

MessagePrefixMessageGroup::getDescription ( IContextSource $context = null)

Returns a longer description about the group.

Description can use wikitext. Parameter $context was added in 2012-10-22.

Parameters
IContextSource | null$contextContext can be used by subclasses to provide translated descriptions, for example.
Returns
string

Reimplemented from MessageGroupOld.

Definition at line 29 of file MessagePrefixMessageGroup.php.

◆ getId()

MessagePrefixMessageGroup::getId ( )
Returns
string

Reimplemented from MessageGroupOld.

Definition at line 21 of file MessagePrefixMessageGroup.php.

◆ getLabel()

MessagePrefixMessageGroup::getLabel ( IContextSource $context = null)
Parameters
IContextSource | null$context
Returns
string

Reimplemented from MessageGroupOld.

Definition at line 25 of file MessagePrefixMessageGroup.php.

◆ getValidator()

MessagePrefixMessageGroup::getValidator ( )

Returns a message validator object or null.

Returns
ValidationRunner|null

Reimplemented from MessageGroupOld.

Definition at line 38 of file MessagePrefixMessageGroup.php.

◆ setLanguage()

MessagePrefixMessageGroup::setLanguage ( $code)

Definition at line 17 of file MessagePrefixMessageGroup.php.

Member Data Documentation

◆ $language

MessagePrefixMessageGroup::$language
protected

Definition at line 12 of file MessagePrefixMessageGroup.php.


The documentation for this class was generated from the following file: