You are here

public function LanguageKeyValueItem::getValue in Lingotek Translation 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Field/FieldType/LanguageKeyValueItem.php \Drupal\lingotek\Plugin\Field\FieldType\LanguageKeyValueItem::getValue()
  2. 4.0.x src/Plugin/Field/FieldType/LanguageKeyValueItem.php \Drupal\lingotek\Plugin\Field\FieldType\LanguageKeyValueItem::getValue()
  3. 3.0.x src/Plugin/Field/FieldType/LanguageKeyValueItem.php \Drupal\lingotek\Plugin\Field\FieldType\LanguageKeyValueItem::getValue()
  4. 3.1.x src/Plugin/Field/FieldType/LanguageKeyValueItem.php \Drupal\lingotek\Plugin\Field\FieldType\LanguageKeyValueItem::getValue()
  5. 3.2.x src/Plugin/Field/FieldType/LanguageKeyValueItem.php \Drupal\lingotek\Plugin\Field\FieldType\LanguageKeyValueItem::getValue()
  6. 3.3.x src/Plugin/Field/FieldType/LanguageKeyValueItem.php \Drupal\lingotek\Plugin\Field\FieldType\LanguageKeyValueItem::getValue()
  7. 3.4.x src/Plugin/Field/FieldType/LanguageKeyValueItem.php \Drupal\lingotek\Plugin\Field\FieldType\LanguageKeyValueItem::getValue()
  8. 3.5.x src/Plugin/Field/FieldType/LanguageKeyValueItem.php \Drupal\lingotek\Plugin\Field\FieldType\LanguageKeyValueItem::getValue()
  9. 3.6.x src/Plugin/Field/FieldType/LanguageKeyValueItem.php \Drupal\lingotek\Plugin\Field\FieldType\LanguageKeyValueItem::getValue()
  10. 3.7.x src/Plugin/Field/FieldType/LanguageKeyValueItem.php \Drupal\lingotek\Plugin\Field\FieldType\LanguageKeyValueItem::getValue()
  11. 3.8.x src/Plugin/Field/FieldType/LanguageKeyValueItem.php \Drupal\lingotek\Plugin\Field\FieldType\LanguageKeyValueItem::getValue()

Gets the data value.

Return value

mixed The data value.

Overrides Map::getValue

File

src/Plugin/Field/FieldType/LanguageKeyValueItem.php, line 101
Contains Drupal\lingotek\Plugin\Field\FieldType\LanguageKeyValueItem.

Class

LanguageKeyValueItem
Plugin implementation of the 'language_key_value' field type.

Namespace

Drupal\lingotek\Plugin\Field\FieldType

Code

public function getValue() {
  $values = parent::getValue();
  if (is_object($values['language'])) {
    $values['language'] = $values['language']
      ->getId();
  }
  return $values;
}