FieldAPIHandlerTrait
trait FieldAPIHandlerTrait (View source)
A trait containing helper methods for field definitions.
Properties
| protected FieldDefinitionInterface | $fieldDefinition | The field definition. |
|
| protected FieldStorageConfigInterface | $fieldStorageDefinition | The field storage definition. |
|
| protected EntityFieldManagerInterface | $entityFieldManager | The entity field manager. |
Methods
getFieldDefinition()
Gets the field definition.
getFieldStorageDefinition()
Gets the field storage configuration.
getEntityFieldManager()
Returns the entity field manager.
Details
protected FieldDefinitionInterface
getFieldDefinition()
Gets the field definition.
A View works on an entity type across bundles, and thus only has access to field storage definitions. In order to be able to use widgets and formatters, we create a generic field definition out of that storage definition.
protected FieldStorageConfigInterface
getFieldStorageDefinition()
Gets the field storage configuration.
protected EntityFieldManagerInterface
getEntityFieldManager()
Returns the entity field manager.