function Language::getValue
Return value
\Drupal\Core\Language\LanguageInterface|null The language object, or NULL if the language is not set.
Overrides TypedData::getValue
1 call to Language::getValue()
- Language::getString in core/
lib/ Drupal/ Core/ TypedData/ Plugin/ DataType/ Language.php - Returns a string representation of the data.
File
-
core/
lib/ Drupal/ Core/ TypedData/ Plugin/ DataType/ Language.php, line 41
Class
- Language
- Defines the 'language' data type.
Namespace
Drupal\Core\TypedData\Plugin\DataTypeCode
public function getValue() {
if (!isset($this->language) && $this->id) {
$this->language = \Drupal::languageManager()->getLanguage($this->id);
}
return $this->language;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.