Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
MediaWiki\Extension\Translate\MessageGroupProcessing\MessageGroupStatesUpdaterJob Class Reference

Logic for handling automatic message group state changes. More...

Inheritance diagram for MediaWiki\Extension\Translate\MessageGroupProcessing\MessageGroupStatesUpdaterJob:
MediaWiki\Extension\Translate\Jobs\GenericTranslateJob

Public Member Functions

 __construct (Title $title, array $params=[])
 
 run ()
 

Static Public Member Functions

static onChange (MessageHandle $handle)
 Hook: TranslateEventTranslationReview and also on translation changes.
 
static newJob (Title $title)
 
static getGroupsWithTransitions (MessageHandle $handle)
 
static getStatValue (array $stats, string $type)
 
static matchCondition (int $value, string $condition, int $max)
 
static getNewState (array $stats, array $transitions)
 

Additional Inherited Members

- Protected Member Functions inherited from MediaWiki\Extension\Translate\Jobs\GenericTranslateJob
 logDebug (string $msg, array $context=[])
 
 logInfo (string $msg, array $context=[])
 
 logNotice (string $msg, array $context=[])
 
 logWarning (string $msg, array $context=[])
 
 logError (string $msg, array $context=[])
 

Detailed Description

Logic for handling automatic message group state changes.

Author
Niklas Laxström

Definition at line 23 of file MessageGroupStatesUpdaterJob.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Extension\Translate\MessageGroupProcessing\MessageGroupStatesUpdaterJob::__construct ( Title $title,
array $params = [] )

Definition at line 24 of file MessageGroupStatesUpdaterJob.php.

Member Function Documentation

◆ getGroupsWithTransitions()

static MediaWiki\Extension\Translate\MessageGroupProcessing\MessageGroupStatesUpdaterJob::getGroupsWithTransitions ( MessageHandle $handle)
static

Definition at line 70 of file MessageGroupStatesUpdaterJob.php.

◆ getNewState()

static MediaWiki\Extension\Translate\MessageGroupProcessing\MessageGroupStatesUpdaterJob::getNewState ( array $stats,
array $transitions )
static
Parameters
int[]$stats
array[]$transitions
Returns
string|bool

Definition at line 127 of file MessageGroupStatesUpdaterJob.php.

◆ getStatValue()

static MediaWiki\Extension\Translate\MessageGroupProcessing\MessageGroupStatesUpdaterJob::getStatValue ( array $stats,
string $type )
static

Definition at line 89 of file MessageGroupStatesUpdaterJob.php.

◆ matchCondition()

static MediaWiki\Extension\Translate\MessageGroupProcessing\MessageGroupStatesUpdaterJob::matchCondition ( int $value,
string $condition,
int $max )
static

Definition at line 109 of file MessageGroupStatesUpdaterJob.php.

◆ newJob()

static MediaWiki\Extension\Translate\MessageGroupProcessing\MessageGroupStatesUpdaterJob::newJob ( Title $title)
static

Definition at line 38 of file MessageGroupStatesUpdaterJob.php.

◆ onChange()

static MediaWiki\Extension\Translate\MessageGroupProcessing\MessageGroupStatesUpdaterJob::onChange ( MessageHandle $handle)
static

Hook: TranslateEventTranslationReview and also on translation changes.

Definition at line 33 of file MessageGroupStatesUpdaterJob.php.

◆ run()

MediaWiki\Extension\Translate\MessageGroupProcessing\MessageGroupStatesUpdaterJob::run ( )

Definition at line 42 of file MessageGroupStatesUpdaterJob.php.


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