public function Context::calculateDependencies in Context 8.4
Calculates dependencies and stores them in the dependency property.
Return value
$this
Overrides ConfigEntityBase::calculateDependencies
See also
\Drupal\Core\Config\Entity\ConfigDependencyManager
File
- src/
Entity/ Context.php, line 396
Class
- Context
- Defines the Context entity.
Namespace
Drupal\context\EntityCode
public function calculateDependencies() {
$dependencies = parent::calculateDependencies();
/** @var \Drupal\context\Plugin\ContextReactionPluginCollection $reaction_collection */
$reaction_collection = $this
->getReactions();
/** @var \Drupal\Core\Condition\ConditionPluginCollection $condition_collection */
$condition_collection = $this
->getConditions();
if (empty($reaction_collection) && empty($condition_collection)) {
return $dependencies;
}
$this
->calculateConditionDependencies($condition_collection);
$this
->calculateReactionDependencies($reaction_collection);
return $this;
}