function Entity::calculateDependencies
Same name in this branch
- 9 core/modules/views/src/Plugin/views/area/Entity.php \Drupal\views\Plugin\views\area\Entity::calculateDependencies()
- 9 core/modules/migrate/src/Plugin/migrate/destination/Entity.php \Drupal\migrate\Plugin\migrate\destination\Entity::calculateDependencies()
Same name in other branches
- 8.9.x core/modules/views/src/Plugin/views/argument_validator/Entity.php \Drupal\views\Plugin\views\argument_validator\Entity::calculateDependencies()
- 8.9.x core/modules/views/src/Plugin/views/area/Entity.php \Drupal\views\Plugin\views\area\Entity::calculateDependencies()
- 8.9.x core/modules/migrate/src/Plugin/migrate/destination/Entity.php \Drupal\migrate\Plugin\migrate\destination\Entity::calculateDependencies()
- 10 core/modules/views/src/Plugin/views/argument_validator/Entity.php \Drupal\views\Plugin\views\argument_validator\Entity::calculateDependencies()
- 10 core/modules/views/src/Plugin/views/area/Entity.php \Drupal\views\Plugin\views\area\Entity::calculateDependencies()
- 10 core/modules/migrate/src/Plugin/migrate/destination/Entity.php \Drupal\migrate\Plugin\migrate\destination\Entity::calculateDependencies()
- 11.x core/modules/views/src/Plugin/views/argument_validator/Entity.php \Drupal\views\Plugin\views\argument_validator\Entity::calculateDependencies()
- 11.x core/modules/views/src/Plugin/views/area/Entity.php \Drupal\views\Plugin\views\area\Entity::calculateDependencies()
- 11.x core/modules/migrate/src/Plugin/migrate/destination/Entity.php \Drupal\migrate\Plugin\migrate\destination\Entity::calculateDependencies()
Overrides PluginBase::calculateDependencies
1 call to Entity::calculateDependencies()
- User::calculateDependencies in core/
modules/ user/ src/ Plugin/ views/ argument_validator/ User.php - Calculates dependencies for the configured plugin.
1 method overrides Entity::calculateDependencies()
- User::calculateDependencies in core/
modules/ user/ src/ Plugin/ views/ argument_validator/ User.php - Calculates dependencies for the configured plugin.
File
-
core/
modules/ views/ src/ Plugin/ views/ argument_validator/ Entity.php, line 234
Class
- Entity
- Defines an argument validator plugin for each entity type.
Namespace
Drupal\views\Plugin\views\argument_validatorCode
public function calculateDependencies() {
$dependencies = parent::calculateDependencies();
$entity_type_id = $this->definition['entity_type'];
$bundle_entity_type = $this->entityTypeManager
->getDefinition($entity_type_id)
->getBundleEntityType();
// The bundle entity type might not exist. For example, users do not have
// bundles.
if ($this->entityTypeManager
->hasHandler($bundle_entity_type, 'storage')) {
$bundle_entity_storage = $this->entityTypeManager
->getStorage($bundle_entity_type);
foreach ($bundle_entity_storage->loadMultiple(array_keys($this->options['bundles'])) as $bundle_entity) {
$dependencies[$bundle_entity->getConfigDependencyKey()][] = $bundle_entity->getConfigDependencyName();
}
}
return $dependencies;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.