You are here

protected function FieldBlock::getFieldStorageDefinition in Field as Block 8.2

Gets the field storage definition.

Parameters

string $field_name: The field name.

Return value

\Drupal\Core\Field\FieldStorageDefinitionInterface The field storage definition used by this block.

2 calls to FieldBlock::getFieldStorageDefinition()
FieldBlock::calculateDependencies in src/Plugin/Block/FieldBlock.php
FieldBlock::getFieldDefinition in src/Plugin/Block/FieldBlock.php
Gets the field definition.

File

src/Plugin/Block/FieldBlock.php, line 198

Class

FieldBlock
Provides a fieldblock.

Namespace

Drupal\fieldblock\Plugin\Block

Code

protected function getFieldStorageDefinition($field_name) {
  $field_storage_definitions = $this->entityFieldManager
    ->getFieldStorageDefinitions($this
    ->getDerivativeId());
  return $field_storage_definitions[$field_name];
}