SiteLanguageAccessorTrait

Table of Contents

Properties

$languageAspect  : LanguageAspect

Methods

getLanguageAspect()  : LanguageAspect
Provides LanguageAspect which contains the logic how fallbacks for a given context/overlay-mode shall be handled.
resolveAllRelevantLanguageIds()  : array<string|int, int>
Resolves all language ids that are relevant to retrieve the most specific variant of a record.
resolveLanguageFallback()  : array<string|int, mixed>|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() : array<string|int, 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
array<string|int, int>

resolveLanguageFallback()

Resolves one record out of given language fallbacks.

protected resolveLanguageFallback(array<string|int, mixed> $results, string|null $languageFieldName, array<string|int, mixed>|null $languageIds) : array<string|int, mixed>|null
Parameters
$results : array<string|int, mixed>
$languageFieldName : string|null
$languageIds : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

        
On this page

Search results