You are here

public function ResourceField::value in RESTful 7.2

Gets the value for the field given a data source.

Parameters

DataInterpreterInterface $interpreter: The data source object. Interacts with the data storage.

Return value

mixed The value for the public field.

Throws

IncompatibleFieldDefinitionException

Overrides ResourceFieldInterface::value

4 calls to ResourceField::value()
ResourceField::compoundDocumentId in src/Plugin/resource/Field/ResourceField.php
Fetches the embedded identifier(s) for the current resource field, if any.
ResourceField::render in src/Plugin/resource/Field/ResourceField.php
Gets the value of a field and applies all process callbacks to it.
ResourceFieldDbColumn::value in src/Plugin/resource/Field/ResourceFieldDbColumn.php
Gets the value for the field given a data source.
ResourceFieldKeyValue::value in src/Plugin/resource/Field/ResourceFieldKeyValue.php
Gets the value for the field given a data source.
2 methods override ResourceField::value()
ResourceFieldDbColumn::value in src/Plugin/resource/Field/ResourceFieldDbColumn.php
Gets the value for the field given a data source.
ResourceFieldKeyValue::value in src/Plugin/resource/Field/ResourceFieldKeyValue.php
Gets the value for the field given a data source.

File

src/Plugin/resource/Field/ResourceField.php, line 67
Contains \Drupal\restful\Plugin\resource\ResourceField.

Class

ResourceField

Namespace

Drupal\restful\Plugin\resource\Field

Code

public function value(DataInterpreterInterface $interpreter) {
  if ($callback = $this
    ->getCallback()) {
    return ResourceManager::executeCallback($callback, array(
      $interpreter,
    ));
  }
  return NULL;
}