Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
RecentMessageGroup Class Reference
Inheritance diagram for RecentMessageGroup:
WikiMessageGroup MessageGroupOld MessageGroup RecentAdditionsMessageGroup

Public Member Functions

 __construct ()
 These groups are always generated for one language.
 
 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.
 
 getMessageContent (MessageHandle $handle)
 Subpage language code, if any in the title, is ignored.
 
- 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
 
 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
 
 getSupportConfig ()
 Gets support URL defined for the group if any.
 
 getRelatedPage ()
 @inheritDoc
 
- Public Member Functions inherited from MessageGroup
 initCollection ( $code)
 Initialises a message collection with the given language code, message definitions and message tags.
 

Protected Member Functions

 getRCCutoff ()
 
 getQueryConditions ()
 Allows subclasses to partially customize the query.
 
 matchingMessage (MessageHandle $handle)
 Filters out messages that should not be displayed here as they are not displayed in other places.
 
- Protected Member Functions inherited from MessageGroupOld
 isSourceLanguage ( $code)
 

Protected Attributes

 $namespace = false
 
 $language
 
- Protected Attributes inherited from WikiMessageGroup
 $source
 
- Protected Attributes inherited from MessageGroupOld
 $label = 'none'
 
 $id = 'none'
 
 $namespace = NS_MEDIAWIKI
 
 $description = null
 
 $meta = false
 
 $mangler = null
 
 $messages = []
 

Additional Inherited Members

- Static Public Member Functions inherited from MessageGroupOld
static normaliseKeys ( $array)
 
- Static Protected Member Functions inherited from MessageGroupOld
static addContext (Message $message, ?IContextSource $context=null)
 

Detailed Description

Since
2011-11-28

Definition at line 24 of file RecentMessageGroup.php.

Constructor & Destructor Documentation

◆ __construct()

RecentMessageGroup::__construct ( )

These groups are always generated for one language.

Method setLanguage must be called before calling getDefinitions.

Definition at line 38 of file RecentMessageGroup.php.

Member Function Documentation

◆ getDefinitions()

RecentMessageGroup::getDefinitions ( )

Fetch definitions from database.

Returns
array Array of messages keys with definitions.

Reimplemented from WikiMessageGroup.

Definition at line 102 of file RecentMessageGroup.php.

◆ getDescription()

RecentMessageGroup::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.

Reimplemented in RecentAdditionsMessageGroup.

Definition at line 56 of file RecentMessageGroup.php.

◆ getId()

RecentMessageGroup::getId ( )
Returns
string

Reimplemented from MessageGroupOld.

Reimplemented in RecentAdditionsMessageGroup.

Definition at line 45 of file RecentMessageGroup.php.

◆ getLabel()

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

Reimplemented from MessageGroupOld.

Reimplemented in RecentAdditionsMessageGroup.

Definition at line 49 of file RecentMessageGroup.php.

◆ getMessageContent()

RecentMessageGroup::getMessageContent ( MessageHandle $handle)

Subpage language code, if any in the title, is ignored.

Parameters
MessageHandle$handle
Returns
null|string

Definition at line 157 of file RecentMessageGroup.php.

◆ getQueryConditions()

RecentMessageGroup::getQueryConditions ( )
protected

Allows subclasses to partially customize the query.

Returns
array

Reimplemented in RecentAdditionsMessageGroup.

Definition at line 78 of file RecentMessageGroup.php.

◆ getRCCutoff()

RecentMessageGroup::getRCCutoff ( )
protected

Definition at line 63 of file RecentMessageGroup.php.

◆ getValidator()

RecentMessageGroup::getValidator ( )

Returns a message validator object or null.

Returns
ValidationRunner|null

Reimplemented from MessageGroupOld.

Definition at line 148 of file RecentMessageGroup.php.

◆ matchingMessage()

RecentMessageGroup::matchingMessage ( MessageHandle $handle)
protected

Filters out messages that should not be displayed here as they are not displayed in other places.

Parameters
MessageHandle$handle
Returns
bool

Definition at line 98 of file RecentMessageGroup.php.

◆ setLanguage()

RecentMessageGroup::setLanguage ( $code)

Definition at line 41 of file RecentMessageGroup.php.

Member Data Documentation

◆ $language

RecentMessageGroup::$language
protected

Definition at line 32 of file RecentMessageGroup.php.

◆ $namespace

RecentMessageGroup::$namespace = false
protected

Definition at line 30 of file RecentMessageGroup.php.


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