You are here

public function LanguageConfigFactoryOverride::setLanguageFromDefault in Drupal 8

Sets the language to be used in configuration overrides from the default.

Parameters

\Drupal\Core\Language\LanguageDefault $language_default: The default language.

Return value

$this

Overrides LanguageConfigFactoryOverrideInterface::setLanguageFromDefault

Deprecated

in drupal:8.3.0 and is removed from drupal:9.0.0. This method has been replaced by injecting the default language into the constructor.

File

core/modules/language/src/Config/LanguageConfigFactoryOverride.php, line 149

Class

LanguageConfigFactoryOverride
Provides language overrides for the configuration factory.

Namespace

Drupal\language\Config

Code

public function setLanguageFromDefault(LanguageDefault $language_default = NULL) {
  $this->language = $language_default ? $language_default
    ->get() : NULL;
  return $this;
}