You are here

public function BusinessRule::calculateDependencies in Business Rules 2.x

Same name and namespace in other branches
  1. 8 src/Entity/BusinessRule.php \Drupal\business_rules\Entity\BusinessRule::calculateDependencies()

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/BusinessRule.php, line 494

Class

BusinessRule
Defines the Rule entity.

Namespace

Drupal\business_rules\Entity

Code

public function calculateDependencies() {
  parent::calculateDependencies();

  /** @var \Drupal\business_rules\BusinessRulesItemObject $item */
  foreach ($this
    ->getItems() as $item) {
    $this
      ->addDependency('config', $item
      ->loadEntity()
      ->getConfigDependencyName());
  }
  return $this;
}