public function EntityUsageTrackInterface::getTargetEntities in Entity Usage 8.2
Same name and namespace in other branches
- 8.3 src/EntityUsageTrackInterface.php \Drupal\entity_usage\EntityUsageTrackInterface::getTargetEntities()
Retrieve the target entity(ies) from a field item value.
Parameters
\Drupal\Core\Field\FieldItemInterface $item: The field item to get the target entity(ies) from.
Return value
string[] An indexed array of strings where each target entity type and ID are concatenated with a "|" character. Will return an empty array if no target entity could be retrieved from the received field item value.
2 calls to EntityUsageTrackInterface::getTargetEntities()
- EntityUsageTrackBase::trackOnEntityCreation in src/
EntityUsageTrackBase.php - Track usage updates on the creation of entities.
- EntityUsageTrackBase::trackOnEntityUpdate in src/
EntityUsageTrackBase.php - Track usage updates on the edition of entities.
6 methods override EntityUsageTrackInterface::getTargetEntities()
- BlockField::getTargetEntities in src/
Plugin/ EntityUsage/ Track/ BlockField.php - Retrieve the target entity(ies) from a field item value.
- DynamicEntityReference::getTargetEntities in src/
Plugin/ EntityUsage/ Track/ DynamicEntityReference.php - Retrieve the target entity(ies) from a field item value.
- EntityReference::getTargetEntities in src/
Plugin/ EntityUsage/ Track/ EntityReference.php - Retrieve the target entity(ies) from a field item value.
- LayoutBuilder::getTargetEntities in src/
Plugin/ EntityUsage/ Track/ LayoutBuilder.php - Retrieve the target entity(ies) from a field item value.
- Link::getTargetEntities in src/
Plugin/ EntityUsage/ Track/ Link.php - Retrieve the target entity(ies) from a field item value.
File
- src/
EntityUsageTrackInterface.php, line 94
Class
- EntityUsageTrackInterface
- Defines the interface for entity_usage track methods.
Namespace
Drupal\entity_usageCode
public function getTargetEntities(FieldItemInterface $item);