function RdfMapping::calculateDependencies

Same name and namespace in other branches
  1. 8.9.x core/modules/rdf/src/Entity/RdfMapping.php \Drupal\rdf\Entity\RdfMapping::calculateDependencies()

File

core/modules/rdf/src/Entity/RdfMapping.php, line 144

Class

RdfMapping
Config entity for working with RDF mappings.

Namespace

Drupal\rdf\Entity

Code

public function calculateDependencies() {
  parent::calculateDependencies();
  // Create dependency on the bundle.
  $entity_type = \Drupal::entityTypeManager()->getDefinition($this->targetEntityType);
  $this->addDependency('module', $entity_type->getProvider());
  $bundle_config_dependency = $entity_type->getBundleConfigDependency($this->bundle);
  $this->addDependency($bundle_config_dependency['type'], $bundle_config_dependency['name']);
  return $this;
}

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