function ConfigTest::calculateDependencies

Same name in other branches
  1. 9 core/modules/config/tests/config_test/src/Entity/ConfigTest.php \Drupal\config_test\Entity\ConfigTest::calculateDependencies()
  2. 8.9.x core/modules/config/tests/config_test/src/Entity/ConfigTest.php \Drupal\config_test\Entity\ConfigTest::calculateDependencies()
  3. 10 core/modules/config/tests/config_test/src/Entity/ConfigTest.php \Drupal\config_test\Entity\ConfigTest::calculateDependencies()

Overrides ConfigEntityBase::calculateDependencies

File

core/modules/config/tests/config_test/src/Entity/ConfigTest.php, line 140

Class

ConfigTest
Defines the ConfigTest configuration entity.

Namespace

Drupal\config_test\Entity

Code

public function calculateDependencies() {
    parent::calculateDependencies();
    if ($module = \Drupal::state()->get('config_test_new_dependency', FALSE)) {
        $this->addDependency('module', $module);
    }
    return $this;
}

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