public function Language::getValue

Implements TypedDataInterface::getValue().

Overrides TypedData::getValue

1 call to Language::getValue()
Language::getString in drupal/core/lib/Drupal/Core/TypedData/Type/Language.php
Implements TypedDataInterface::getString().

File

drupal/core/lib/Drupal/Core/TypedData/Type/Language.php, line 82
Definition of Drupal\Core\TypedData\Type\Language.

Class

Language
Defines the 'language' data type.

Namespace

Drupal\Core\TypedData\Type

Code

public function getValue() {
  $source = $this
    ->getLanguageCodeSource();
  $langcode = $source ? $source
    ->getValue() : $this->langcode;
  return $langcode ? language_load($langcode) : NULL;
}