public function Field::getValue

Implements TypedDataInterface::getValue().

Overrides TypedData::getValue

File

drupal/core/lib/Drupal/Core/Entity/Field/Type/Field.php, line 56
Definition of Drupal\Core\Entity\Field\Type\Field.

Class

Field
An entity field, i.e. a list of field items.

Namespace

Drupal\Core\Entity\Field\Type

Code

public function getValue() {
  $values = array();
  foreach ($this->list as $delta => $item) {
    $values[$delta] = !$item
      ->isEmpty() ? $item
      ->getValue() : NULL;
  }
  return $values;
}