You are here

public function Action::calculateDependencies in Business Rules 8

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

Calculates dependencies and stores them in the dependency property.

Return value

$this

Overrides BusinessRulesItemBase::calculateDependencies

See also

\Drupal\Core\Config\Entity\ConfigDependencyManager

File

src/Entity/Action.php, line 104

Class

Action
Defines the Action entity.

Namespace

Drupal\business_rules\Entity

Code

public function calculateDependencies() {
  parent::calculateDependencies();
  $items = $this
    ->getSettings('items');
  if (is_array($items)) {
    foreach (BusinessRulesItemObject::itemsArrayToItemsObject($items) as $item) {
      $this
        ->addDependency('config', $item
        ->loadEntity()
        ->getConfigDependencyName());
    }
  }
  return $this;
}