TranslationConfigurationProvider

Read onlyYes

Contains translation tools

Internal

The whole class is subject to be removed, fetch all language info from the current site object.

Tags
phpstan-type

LanguageRef -1|0|positive-int

Attributes
#[Autoconfigure]
$public: true

Table of Contents

Methods

__construct()  : mixed
getSystemLanguages()  : array<string|int, mixed>
Returns array of languages given for a specific site (or "nullSite" if on page=0) The property flagIcon returns a string <flags-xx>.
translationInfo()  : array<string|int, mixed>|string
Information about translation for an element Will overlay workspace version of record too!
addSiteLanguagesToConsolidatedList()  : array<string|int, mixed>
getBackendUserAuthentication()  : BackendUserAuthentication

Methods

getSystemLanguages()

Returns array of languages given for a specific site (or "nullSite" if on page=0) The property flagIcon returns a string <flags-xx>.

public getSystemLanguages([int $pageId = 0 ]) : array<string|int, mixed>
Parameters
$pageId : int = 0

Page id (used to get TSconfig configuration setting flag and label for default language)

Return values
array<string|int, mixed>

translationInfo()

Information about translation for an element Will overlay workspace version of record too!

public translationInfo(string $table, int $uid[, int $languageUid = 0 ][, array<string|int, mixed>|null $row = null ][, array<string|int, mixed>|string $selFieldList = '' ]) : array<string|int, mixed>|string
Parameters
$table : string

Table name

$uid : int

Record uid

$languageUid : int = 0

Language uid. If 0, then all languages are selected.

$row : array<string|int, mixed>|null = null

The record to be translated

$selFieldList : array<string|int, mixed>|string = ''

Select fields for the query which fetches the translations of the current record

Return values
array<string|int, mixed>|string

Array with information or error message as a string.

addSiteLanguagesToConsolidatedList()

protected addSiteLanguagesToConsolidatedList(array<string|int, mixed> $allSystemLanguages, array<string|int, mixed> $languagesOfSpecificSite, SiteInterface $site, bool $includeSiteSuffix) : array<string|int, mixed>
Parameters
$allSystemLanguages : array<string|int, mixed>
$languagesOfSpecificSite : array<string|int, mixed>
$site : SiteInterface
$includeSiteSuffix : bool
Return values
array<string|int, mixed>

        
On this page

Search results