You are here

public function EventTypeRule::calculateDependencies in RNG - Events and Registrations 3.x

Same name and namespace in other branches
  1. 8.2 src/Entity/EventTypeRule.php \Drupal\rng\Entity\EventTypeRule::calculateDependencies()
  2. 8 src/Entity/EventTypeRule.php \Drupal\rng\Entity\EventTypeRule::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/EventTypeRule.php, line 159

Class

EventTypeRule
Defines the event type entity.

Namespace

Drupal\rng\Entity

Code

public function calculateDependencies() {
  parent::calculateDependencies();
  if ($event_type = RngEventType::load($this
    ->getEventEntityTypeId() . '.' . $this
    ->getEventBundle())) {
    $this
      ->addDependency('config', $event_type
      ->getConfigDependencyName());
  }
  return $this;
}