protected function DependencyHelperTrait::getDependentEntityWrapper in Dependency Calculation 8
Calculate entity dependencies and return the DependentEntityWrapper object.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity object.
Return value
\Drupal\depcalc\DependentEntityWrapperInterface|null The DependentEntityWrapper object.
Throws
\Exception
2 calls to DependencyHelperTrait::getDependentEntityWrapper()
- DependencyHelperTrait::getEntityDependencies in tests/
src/ Kernel/ DependencyHelperTrait.php - Returns the list of entity dependencies.
- DependencyHelperTrait::getModuleDependencies in tests/
src/ Kernel/ DependencyHelperTrait.php - Returns the list of module dependencies.
File
- tests/
src/ Kernel/ DependencyHelperTrait.php, line 64
Class
Namespace
Drupal\Tests\depcalc\KernelCode
protected function getDependentEntityWrapper(EntityInterface $entity) : ?DependentEntityWrapperInterface {
$dependentEntityWrapper = new DependentEntityWrapper($entity);
$stack = new DependencyStack();
$this->calculator
->calculateDependencies($dependentEntityWrapper, $stack);
return $stack
->getDependency($entity
->uuid());
}