MediaWiki REL1_40
|
Public Member Functions | |
__construct (PageIdentity $pageIdentity, PageConfigFactory $pageConfigFactory, Parsoid $parsoid, array $parsoidSettings, SiteConfig $siteConfig, TitleFactory $titleFactory, LanguageConverterFactory $languageConverterFactory, LanguageFactory $languageFactory) | |
convertPageBundleVariant (PageBundle $pageBundle, Bcp47Code $targetVariant, ?Bcp47Code $sourceVariant=null) | |
Perform variant conversion on a PageBundle object. | |
convertParserOutputVariant (ParserOutput $parserOutput, Bcp47Code $targetVariant, ?Bcp47Code $sourceVariant=null) | |
Perform variant conversion on a ParserOutput object. | |
disableFallbackLanguageConverter () | |
Disable fallback language variant converter. | |
setPageConfig (PageConfig $pageConfig) | |
Set the PageConfig object to be used during language variant conversion. | |
setPageLanguageOverride (Bcp47Code $language) | |
Set the page content language override. | |
Definition at line 25 of file LanguageVariantConverter.php.
MediaWiki\Parser\Parsoid\LanguageVariantConverter::__construct | ( | PageIdentity | $pageIdentity, |
PageConfigFactory | $pageConfigFactory, | ||
Parsoid | $parsoid, | ||
array | $parsoidSettings, | ||
SiteConfig | $siteConfig, | ||
TitleFactory | $titleFactory, | ||
LanguageConverterFactory | $languageConverterFactory, | ||
LanguageFactory | $languageFactory ) |
Definition at line 65 of file LanguageVariantConverter.php.
References MediaWiki\Title\TitleFactory\castFromPageIdentity().
MediaWiki\Parser\Parsoid\LanguageVariantConverter::convertPageBundleVariant | ( | PageBundle | $pageBundle, |
Bcp47Code | $targetVariant, | ||
?Bcp47Code | $sourceVariant = null ) |
Perform variant conversion on a PageBundle object.
PageBundle | $pageBundle | |
Bcp47Code | $targetVariant | |
?Bcp47Code | $sourceVariant |
HttpException |
Definition at line 120 of file LanguageVariantConverter.php.
MediaWiki\Parser\Parsoid\LanguageVariantConverter::convertParserOutputVariant | ( | ParserOutput | $parserOutput, |
Bcp47Code | $targetVariant, | ||
?Bcp47Code | $sourceVariant = null ) |
Perform variant conversion on a ParserOutput object.
ParserOutput | $parserOutput | |
Bcp47Code | $targetVariant | |
?Bcp47Code | $sourceVariant |
Definition at line 193 of file LanguageVariantConverter.php.
MediaWiki\Parser\Parsoid\LanguageVariantConverter::disableFallbackLanguageConverter | ( | ) |
Disable fallback language variant converter.
Definition at line 208 of file LanguageVariantConverter.php.
MediaWiki\Parser\Parsoid\LanguageVariantConverter::setPageConfig | ( | PageConfig | $pageConfig | ) |
Set the PageConfig object to be used during language variant conversion.
If not provided, the object will be created.
PageConfig | $pageConfig |
Definition at line 95 of file LanguageVariantConverter.php.
MediaWiki\Parser\Parsoid\LanguageVariantConverter::setPageLanguageOverride | ( | Bcp47Code | $language | ) |
Set the page content language override.
Bcp47Code | $language |
Definition at line 105 of file LanguageVariantConverter.php.