interface EntityReferenceItemInterface
Same name in other branches
- 11.x core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItemInterface.php \Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItemInterface
Interface definition for field items referencing other entities.
Field items should extend \Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItemBase.
Hierarchy
- interface \Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItemInterface
Expanded class hierarchy of EntityReferenceItemInterface
All classes that implement EntityReferenceItemInterface
2 files declare their use of EntityReferenceItemInterface
- IncludeResolver.php in core/
modules/ jsonapi/ src/ IncludeResolver.php - ResourceTypeRepository.php in core/
modules/ jsonapi/ src/ ResourceType/ ResourceTypeRepository.php
File
-
core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldType/ EntityReferenceItemInterface.php, line 12
Namespace
Drupal\Core\Field\Plugin\Field\FieldTypeView source
interface EntityReferenceItemInterface {
/**
* Returns the referenceable entity types and bundles.
*
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* The field definition for which to retrieve the referenceable entity
* types and bundles.
*
* @return array
* An array of referenceable bundles where the array is keyed by the entity
* type ID, with values an array of bundle names. (It is a single-value
* array with the entity type ID if the entity type does not implement
* bundles.)
*/
public static function getReferenceableBundles(FieldDefinitionInterface $field_definition) : array;
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
EntityReferenceItemInterface::getReferenceableBundles | public static | function | Returns the referenceable entity types and bundles. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.