function ConfigDependencyTest::getDependentIds

Same name in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php \Drupal\KernelTests\Core\Config\ConfigDependencyTest::getDependentIds()
  2. 10 core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php \Drupal\KernelTests\Core\Config\ConfigDependencyTest::getDependentIds()
  3. 11.x core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php \Drupal\KernelTests\Core\Config\ConfigDependencyTest::getDependentIds()

Gets a list of identifiers from an array of configuration entities.

Parameters

\Drupal\Core\Config\Entity\ConfigEntityInterface[] $dependents: An array of configuration entities.

Return value

array An array with values of entity_type_id:ID

1 call to ConfigDependencyTest::getDependentIds()
ConfigDependencyTest::testDependencyManagement in core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php
Tests creating dependencies on configuration entities.

File

core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php, line 650

Class

ConfigDependencyTest
Tests for configuration dependencies.

Namespace

Drupal\KernelTests\Core\Config

Code

protected function getDependentIds(array $dependents) {
    $dependent_ids = [];
    foreach ($dependents as $dependent) {
        $dependent_ids[] = $dependent->getEntityTypeId() . ':' . $dependent->id();
    }
    return $dependent_ids;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.