function EntityReferenceItemInterface::getReferenceableBundles
Same name and namespace in other branches
- 10 core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItemInterface.php \Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItemInterface::getReferenceableBundles()
Returns the referenceable entity types and bundles.
Parameters
\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The field definition for which to retrieve the referenceable entity types and bundles.
Return value
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.)
1 method overrides EntityReferenceItemInterface::getReferenceableBundles()
- EntityReferenceItem::getReferenceableBundles in core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldType/ EntityReferenceItem.php - Returns the referenceable entity types and bundles.
File
-
core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldType/ EntityReferenceItemInterface.php, line 28
Class
- EntityReferenceItemInterface
- Interface definition for field items referencing other entities.
Namespace
Drupal\Core\Field\Plugin\Field\FieldTypeCode
public static function getReferenceableBundles(FieldDefinitionInterface $field_definition) : array;
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.