function EntityField::getFieldStorageDefinition

Same name in other branches
  1. 8.x-3.x modules/ctools_block/src/Plugin/Block/EntityField.php \Drupal\ctools_block\Plugin\Block\EntityField::getFieldStorageDefinition()

Gets the field storage definition.

Return value

\Drupal\Core\Field\FieldStorageDefinitionInterface The field storage definition.

File

modules/ctools_block/src/Plugin/Block/EntityField.php, line 317

Class

EntityField
Provides a block to a field on an entity.

Namespace

Drupal\ctools_block\Plugin\Block

Code

protected function getFieldStorageDefinition() {
    if (empty($this->fieldStorageDefinition)) {
        // Some base fields have no storage.
        $field_definitions = array_merge($this->entityFieldManager
            ->getBaseFieldDefinitions($this->entityTypeId), $this->entityFieldManager
            ->getFieldStorageDefinitions($this->entityTypeId));
        $this->fieldStorageDefinition = $field_definitions[$this->fieldName];
    }
    return $this->fieldStorageDefinition;
}