W3cubDocs

/Drupal 8

class LanguageDefault

Provides a simple get and set wrapper to the default language object.

The default language must be provided without dependencies since it is both configured and a dependency of the configuration system. The LanguageDefault object is a container service. The default values are stored on the container by \Drupal\Core\DrupalKernel::buildContainer(). This allows services to override this parameter in a ServiceProvider, for example, \Drupal\language\LanguageServiceProvider::alter().

Hierarchy

File

core/lib/Drupal/Core/Language/LanguageDefault.php, line 15

Namespace

Drupal\Core\Language

Members

Name Modifiers Type Description
LanguageDefault::$language protected property The default language.
LanguageDefault::get public function Gets the default language.
LanguageDefault::set public function Sets the default language.
LanguageDefault::__construct public function Constructs the default language object.

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Language!LanguageDefault.php/class/LanguageDefault/8.1.x