public function EntityQueue::calculateDependencies in Entityqueue 8
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/ EntityQueue.php, line 233
Class
- EntityQueue
- Defines the EntityQueue entity class.
Namespace
Drupal\entityqueue\EntityCode
public function calculateDependencies() {
parent::calculateDependencies();
// Ensure that the queue depends on the module that provides the target
// entity type.
$target_entity_type = \Drupal::entityTypeManager()
->getDefinition($this
->getTargetEntityTypeId());
$this
->addDependency('module', $target_entity_type
->getProvider());
return $this;
}