public function ConfigTest::calculateDependencies in Drupal 8
Same name and namespace in other branches
- 9 core/modules/config/tests/config_test/src/Entity/ConfigTest.php \Drupal\config_test\Entity\ConfigTest::calculateDependencies()
- 10 core/modules/config/tests/config_test/src/Entity/ConfigTest.php \Drupal\config_test\Entity\ConfigTest::calculateDependencies()
Calculates dependencies and stores them in the dependency property.
Return value
$this
Overrides ConfigEntityBase::calculateDependencies
See also
\Drupal\Core\Config\Entity\ConfigDependencyManager
File
- core/
modules/ config/ tests/ config_test/ src/ Entity/ ConfigTest.php, line 128
Class
- ConfigTest
- Defines the ConfigTest configuration entity.
Namespace
Drupal\config_test\EntityCode
public function calculateDependencies() {
parent::calculateDependencies();
if ($module = \Drupal::state()
->get('config_test_new_dependency', FALSE)) {
$this
->addDependency('module', $module);
}
return $this;
}