public function ContentLanguageSettings::calculateDependencies in Drupal 8
Same name and namespace in other branches
- 9 core/modules/language/src/Entity/ContentLanguageSettings.php \Drupal\language\Entity\ContentLanguageSettings::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/ language/ src/ Entity/ ContentLanguageSettings.php, line 203
Class
- ContentLanguageSettings
- Defines the ContentLanguageSettings entity.
Namespace
Drupal\language\EntityCode
public function calculateDependencies() {
parent::calculateDependencies();
// Create dependency on the bundle.
$entity_type = \Drupal::entityTypeManager()
->getDefinition($this->target_entity_type_id);
$bundle_config_dependency = $entity_type
->getBundleConfigDependency($this->target_bundle);
$this
->addDependency($bundle_config_dependency['type'], $bundle_config_dependency['name']);
return $this;
}