public function EntityReferenceDependencyManager::getDependentEntities in Entity Reference Integrity 8
List the entities that reference the given entity.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity.
Return value
array Array of entity type IDs with arrays of loaded entities.
Overrides EntityReferenceDependencyManagerInterface::getDependentEntities
File
- src/
EntityReferenceDependencyManager.php, line 50
Class
- EntityReferenceDependencyManager
- Calculate entity dependencies based on entity reference fields.
Namespace
Drupal\entity_reference_integrityCode
public function getDependentEntities(EntityInterface $entity) {
return $this->entityTypeManager
->getHandler($entity
->getEntityTypeId(), 'entity_reference_integrity')
->getDependentEntities($entity);
}