SiteLanguageAccessorTrait

trait \TYPO3\CMS\Core\Routing\Aspect\SiteLanguageAccessorTrait

Uses
SiteLanguageAwareTrait

Table of Contents

Properties

$languageAspect  : LanguageAspect
$siteLanguage  : SiteLanguage

Methods

getSiteLanguage()  : SiteLanguage
setSiteLanguage()  : mixed
getLanguageAspect()  : LanguageAspect
Provides LanguageAspect which contains the logic how fallbacks for a given context/overlay-mode shall be handled.
resolveAllRelevantLanguageIds()  : int[]
Resolves all language ids that are relevant to retrieve the most specific variant of a record.
resolveLanguageFallback()  : array|null
Resolves one record out of given language fallbacks.

Properties

Methods

getLanguageAspect()

Provides LanguageAspect which contains the logic how fallbacks for a given context/overlay-mode shall be handled.

protected getLanguageAspect() : LanguageAspect

Tags

see
LanguageAspectFactory::createFromSiteLanguage

Return values

LanguageAspect

resolveAllRelevantLanguageIds()

Resolves all language ids that are relevant to retrieve the most specific variant of a record.

protected resolveAllRelevantLanguageIds() : int[]

The order of these ids defines the processing order concerning language fallback - most specific language comes first in this array.

  • "all language (-1)", most specific if present since there cannot be any localizations
  • "current language" most specific for the current given request context
  • "language fallbacks" falling back to language alternatives (might include "default language")

Return values

int[]

resolveLanguageFallback()

Resolves one record out of given language fallbacks.

protected resolveLanguageFallback(array $results, string|null $languageFieldName, array|null $languageIds) : array|null

Parameters

$results : array
$languageFieldName : string|null
$languageIds : array|null

Return values

array|null
On this page