function Language::getString

Overrides TypedData::getString

File

core/lib/Drupal/Core/TypedData/Plugin/DataType/Language.php, line 73

Class

Language
Defines the 'language' data type.

Namespace

Drupal\Core\TypedData\Plugin\DataType

Code

public function getString() {
  $language = $this->getValue();
  return $language ? $language->getName() : '';
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.