/**
  * {@inheritdoc}
  */
 public function setLanguageFromDefault(LanguageDefault $language_default = NULL)
 {
     $this->language = $language_default ? $language_default->get() : NULL;
     return $this;
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function getDefaultLanguage()
 {
     return $this->defaultLanguage->get();
 }
Exemplo n.º 3
0
 /**
  * Constructs a TranslationManager object.
  *
  * @param \Drupal\Core\Language\LanguageDefault $default_language
  *   The default language.
  */
 public function __construct(LanguageDefault $default_language)
 {
     $this->defaultLangcode = $default_language->get()->getId();
 }