You are here

public function ItemList::getValue in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php \Drupal\Core\TypedData\Plugin\DataType\ItemList::getValue()

Gets the data value.

Return value

mixed

Overrides TypedData::getValue

1 method overrides ItemList::getValue()
FieldItemList::getValue in core/lib/Drupal/Core/Field/FieldItemList.php
@todo Revisit the need when all entity types are converted to NG entities.

File

core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php, line 43
Contains \Drupal\Core\TypedData\Plugin\DataType\ItemList.

Class

ItemList
A generic list class.

Namespace

Drupal\Core\TypedData\Plugin\DataType

Code

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