You are here

protected function DependencyHelperTrait::getEntityDependencies in Dependency Calculation 8

Returns the list of entity dependencies.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity.

Return value

array The list of UUIDs of dependencies (entities).

Throws

\Exception

1 call to DependencyHelperTrait::getEntityDependencies()
LayoutBuilderDependencyCalculatorTest::testEntityDependencies in tests/src/Kernel/EventSubscriber/LayoutBuilderDependencyCalculatorTest.php
Tests the calculation of Layout Builder dependencies.

File

tests/src/Kernel/DependencyHelperTrait.php, line 30

Class

DependencyHelperTrait

Namespace

Drupal\Tests\depcalc\Kernel

Code

protected function getEntityDependencies(EntityInterface $entity) {
  $wrapper = $this
    ->getDependentEntityWrapper($entity);
  return array_keys($wrapper
    ->getDependencies());
}