You are here

public function EntityDisplayModeBase::calculateDependencies in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Entity/EntityDisplayModeBase.php \Drupal\Core\Entity\EntityDisplayModeBase::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/lib/Drupal/Core/Entity/EntityDisplayModeBase.php, line 92
Contains \Drupal\Core\Entity\EntityDisplayModeBase.

Class

EntityDisplayModeBase
Base class for config entity types with settings for form and view modes.

Namespace

Drupal\Core\Entity

Code

public function calculateDependencies() {
  parent::calculateDependencies();
  $target_entity_type = \Drupal::entityManager()
    ->getDefinition($this->targetEntityType);
  $this
    ->addDependency('module', $target_entity_type
    ->getProvider());
  return $this;
}