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

This class encapsulates the information / state needed to mark a page for translation. More...

Public Member Functions

 __construct (TranslatablePage $page, ParserOutput $parserOutput, array $units, array $deletedUnits, bool $firstMark, Status $unitValidationStatus)
 
 getPage ()
 
 getParserOutput ()
 Get the result of the parse.
 
 getUnits ()
 Get translation units present in the parsed text.
 
 getDeletedUnits ()
 Get translation units present in the previously marked text, but not in the parsed one.
 
 isFirstMark ()
 Whether the page has not been marked for translation before.
 
 isValid ()
 Whether the operation is valid.
 
 getUnitValidationStatus ()
 Get the status of the unit validation.
 

Detailed Description

This class encapsulates the information / state needed to mark a page for translation.

Since
2023.10

Definition at line 12 of file TranslatablePageMarkOperation.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Extension\Translate\PageTranslation\TranslatablePageMarkOperation::__construct ( TranslatablePage $page,
ParserOutput $parserOutput,
array $units,
array $deletedUnits,
bool $firstMark,
Status $unitValidationStatus )

Definition at line 22 of file TranslatablePageMarkOperation.php.

Member Function Documentation

◆ getDeletedUnits()

MediaWiki\Extension\Translate\PageTranslation\TranslatablePageMarkOperation::getDeletedUnits ( )

Get translation units present in the previously marked text, but not in the parsed one.

Returns
TranslationUnit[]

Definition at line 60 of file TranslatablePageMarkOperation.php.

◆ getPage()

MediaWiki\Extension\Translate\PageTranslation\TranslatablePageMarkOperation::getPage ( )

Definition at line 38 of file TranslatablePageMarkOperation.php.

◆ getParserOutput()

MediaWiki\Extension\Translate\PageTranslation\TranslatablePageMarkOperation::getParserOutput ( )

Get the result of the parse.

Definition at line 43 of file TranslatablePageMarkOperation.php.

◆ getUnits()

MediaWiki\Extension\Translate\PageTranslation\TranslatablePageMarkOperation::getUnits ( )

Get translation units present in the parsed text.

Returns
TranslationUnit[]

Definition at line 51 of file TranslatablePageMarkOperation.php.

◆ getUnitValidationStatus()

MediaWiki\Extension\Translate\PageTranslation\TranslatablePageMarkOperation::getUnitValidationStatus ( )

Get the status of the unit validation.

Definition at line 75 of file TranslatablePageMarkOperation.php.

◆ isFirstMark()

MediaWiki\Extension\Translate\PageTranslation\TranslatablePageMarkOperation::isFirstMark ( )

Whether the page has not been marked for translation before.

Definition at line 65 of file TranslatablePageMarkOperation.php.

◆ isValid()

MediaWiki\Extension\Translate\PageTranslation\TranslatablePageMarkOperation::isValid ( )

Whether the operation is valid.

Definition at line 70 of file TranslatablePageMarkOperation.php.


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