You are here

public function EventTypeRule::calculateDependencies in RNG - Events and Registrations 8

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

Class

EventTypeRule
Defines the event type entity.

Namespace

Drupal\rng\Entity

Code

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