You are here

protected function FallbackController::ensureFallbackChain in Entity Language Fallback 8

Populate internal fallback chain information if necessary.

2 calls to FallbackController::ensureFallbackChain()
FallbackController::getFallbackChain in src/FallbackController.php
FallbackController::getTranslation in src/FallbackController.php

File

src/FallbackController.php, line 99

Class

FallbackController

Namespace

Drupal\entity_language_fallback

Code

protected function ensureFallbackChain($lang_code) {
  if (isset($this->fallback_chain[$lang_code])) {
    return;
  }
  $this->fallback_chain[$lang_code] = ($language = ConfigurableLanguage::load($lang_code)) ? $language
    ->getThirdPartySetting('entity_language_fallback', 'fallback_langcodes', []) : [];
}