You are here

protected function FieldWrapperBase::getFieldDefinition in (Entity Reference) Field Formatters 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Field/FieldFormatter/FieldWrapperBase.php \Drupal\field_formatter\Plugin\Field\FieldFormatter\FieldWrapperBase::getFieldDefinition()
  2. 3.x src/Plugin/Field/FieldFormatter/FieldWrapperBase.php \Drupal\field_formatter\Plugin\Field\FieldFormatter\FieldWrapperBase::getFieldDefinition()

Get field definition for given field storage definition.

Parameters

\Drupal\Core\Field\FieldStorageDefinitionInterface $field_storage_definition: The field storage definition.

Return value

\Drupal\Core\Field\BaseFieldDefinition The field definition.

1 call to FieldWrapperBase::getFieldDefinition()
FieldWrapperBase::settingsForm in src/Plugin/Field/FieldFormatter/FieldWrapperBase.php
Returns a form to configure settings for the formatter.

File

src/Plugin/Field/FieldFormatter/FieldWrapperBase.php, line 104

Class

FieldWrapperBase
Wraps an existing field.

Namespace

Drupal\field_formatter\Plugin\Field\FieldFormatter

Code

protected function getFieldDefinition(FieldStorageDefinitionInterface $field_storage_definition) {
  return BaseFieldDefinition::createFromFieldStorageDefinition($field_storage_definition);
}