Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
MediaWiki\Extension\Translate\PageTranslation\UpdateTranslatablePageJob Class Reference

Job for updating translation units and translation pages when a translatable page is marked for translation. More...

Inheritance diagram for MediaWiki\Extension\Translate\PageTranslation\UpdateTranslatablePageJob:
MediaWiki\Extension\Translate\Jobs\GenericTranslateJob

Public Member Functions

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

Static Public Member Functions

static newFromPage (TranslatablePage $page, array $sections=[])
 Create a job that updates a translation page.
 
static getRenderJobs (TranslatablePage $page, bool $nonPrioritizedJobs=false)
 Creates jobs needed to create or update all translation pages.
 

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

Job for updating translation units and translation pages when a translatable page is marked for translation.

Definition at line 19 of file UpdateTranslatablePageJob.php.

Constructor & Destructor Documentation

◆ __construct()

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

@inheritDoc

Definition at line 23 of file UpdateTranslatablePageJob.php.

Member Function Documentation

◆ getRenderJobs()

static MediaWiki\Extension\Translate\PageTranslation\UpdateTranslatablePageJob::getRenderJobs ( TranslatablePage $page,
bool $nonPrioritizedJobs = false )
static

Creates jobs needed to create or update all translation pages.

Returns
RunnableJob[]

Definition at line 180 of file UpdateTranslatablePageJob.php.

◆ newFromPage()

static MediaWiki\Extension\Translate\PageTranslation\UpdateTranslatablePageJob::newFromPage ( TranslatablePage $page,
array $sections = [] )
static

Create a job that updates a translation page.

If a list of sections is provided, then the job will also update translation unit pages.

Parameters
TranslatablePage$page
TranslationUnit[]$sections

Definition at line 36 of file UpdateTranslatablePageJob.php.

◆ run()

MediaWiki\Extension\Translate\PageTranslation\UpdateTranslatablePageJob::run ( )

Definition at line 46 of file UpdateTranslatablePageJob.php.


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