You are here

public function FieldItemList::getValue in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Field/FieldItemList.php \Drupal\Core\Field\FieldItemList::getValue()

@todo Revisit the need when all entity types are converted to NG entities.

Overrides ItemList::getValue

2 calls to FieldItemList::getValue()
FieldItemList::defaultValuesFormSubmit in core/lib/Drupal/Core/Field/FieldItemList.php
Processes the submitted default value.
FieldItemList::equals in core/lib/Drupal/Core/Field/FieldItemList.php
Determines equality to another object implementing FieldItemListInterface.

File

core/lib/Drupal/Core/Field/FieldItemList.php, line 106
Contains \Drupal\Core\Field\FieldItemList.

Class

FieldItemList
Represents an entity field; that is, a list of field item objects.

Namespace

Drupal\Core\Field

Code

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