You are here

protected function Field::getFieldDefinition in Synonyms 2.0.x

Retrieve the field definition against which this plugin is configured.

Return value

\Drupal\Core\Field\FieldDefinitionInterface Field definition against which this plugin is configured.

1 call to Field::getFieldDefinition()
Field::calculateDependencies in src/Plugin/Synonyms/Provider/Field.php
Calculates dependencies for the configured plugin.

File

src/Plugin/Synonyms/Provider/Field.php, line 205

Class

Field
Provide synonyms from attached simple fields.

Namespace

Drupal\synonyms\Plugin\Synonyms\Provider

Code

protected function getFieldDefinition() {
  $field = $this->entityFieldManager
    ->getFieldDefinitions($this
    ->getPluginDefinition()['controlled_entity_type'], $this
    ->getPluginDefinition()['controlled_bundle']);
  return $field[$this
    ->getPluginDefinition()['field']];
}