You are here

protected function Field::getFieldStorageDefinition in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/src/Plugin/views/field/Field.php \Drupal\views\Plugin\views\field\Field::getFieldStorageDefinition()

Gets the field storage of the used field.

Return value

\Drupal\Core\Field\FieldStorageDefinitionInterface

Overrides FieldAPIHandlerTrait::getFieldStorageDefinition

5 calls to Field::getFieldStorageDefinition()
Field::calculateDependencies in core/modules/views/src/Plugin/views/field/Field.php
Calculates dependencies for the configured plugin.
Field::clickSort in core/modules/views/src/Plugin/views/field/Field.php
Called to determine what to tell the clicksorter.
Field::defineOptions in core/modules/views/src/Plugin/views/field/Field.php
Information about options for all kinds of purposes will be held here.
Field::getCacheTags in core/modules/views/src/Plugin/views/field/Field.php
The cache tags associated with this object.
Field::query in core/modules/views/src/Plugin/views/field/Field.php
Called to add the field to a query.

File

core/modules/views/src/Plugin/views/field/Field.php, line 321
Contains \Drupal\views\Plugin\views\field\Field.

Class

Field
A field that displays entity field data.

Namespace

Drupal\views\Plugin\views\field

Code

protected function getFieldStorageDefinition() {
  $entity_type_id = $this->definition['entity_type'];
  $field_storage_definitions = $this->entityManager
    ->getFieldStorageDefinitions($entity_type_id);
  $field_storage = NULL;

  // @todo Unify 'entity field'/'field_name' instead of converting back and
  //   forth. https://www.drupal.org/node/2410779
  if (isset($this->definition['field_name'])) {
    $field_storage = $field_storage_definitions[$this->definition['field_name']];
  }
  elseif (isset($this->definition['entity field'])) {
    $field_storage = $field_storage_definitions[$this->definition['entity field']];
  }
  return $field_storage;
}