/** * {@inheritdoc} */ public function value(DataInterpreterInterface $interpreter) { $value = $this->decorated->value($interpreter); if (isset($value)) { // Let the decorated resolve callbacks. return $value; } // Check user has access to the property. if (!$this->access('view', $interpreter)) { return NULL; } $property_wrapper = $this->propertyWrapper($interpreter); $wrapper = $interpreter->getWrapper(); if ($property_wrapper instanceof \EntityListWrapper) { $values = array(); // Multiple values. foreach ($property_wrapper->getIterator() as $item_wrapper) { $values[] = $this->singleValue($item_wrapper, $wrapper, $interpreter->getAccount()); } return $values; } return $this->singleValue($property_wrapper, $wrapper, $interpreter->getAccount()); }
/** * {@inheritdoc} */ public function value(DataInterpreterInterface $interpreter) { return $this->decorated->value($interpreter); }