protected function EntityReferenceField::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.
2 calls to EntityReferenceField::getFieldDefinition()
- EntityReferenceField::calculateDependencies in src/
Plugin/ Synonyms/ Provider/ EntityReferenceField.php - Calculates dependencies for the configured plugin.
- EntityReferenceField::synonymsFind in src/
Plugin/ Synonyms/ Provider/ EntityReferenceField.php - Look up entities by their synonyms within a behavior implementation.
File
- src/
Plugin/ Synonyms/ Provider/ EntityReferenceField.php, line 196
Class
- EntityReferenceField
- Provide synonyms from entity reference field type.
Namespace
Drupal\synonyms\Plugin\Synonyms\ProviderCode
protected function getFieldDefinition() {
$field = $this->entityFieldManager
->getFieldDefinitions($this
->getPluginDefinition()['controlled_entity_type'], $this
->getPluginDefinition()['controlled_bundle']);
return $field[$this
->getPluginDefinition()['field']];
}