RdfMapping::calculateDependencies

public RdfMapping::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/rdf/src/Entity/RdfMapping.php, line 137

Class

RdfMapping
Config entity for working with RDF mappings.

Namespace

Drupal\rdf\Entity

Code

1
2
3
4
5
6
7
8
9
10
11
public function calculateDependencies() {
  parent::calculateDependencies();
 
  // Create dependency on the bundle.
  $entity_type = \Drupal::entityManager()->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;
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.