function Bundle::calculateDependencies
Same name in other branches
- 8.9.x core/modules/views/src/Plugin/views/filter/Bundle.php \Drupal\views\Plugin\views\filter\Bundle::calculateDependencies()
- 10 core/modules/views/src/Plugin/views/filter/Bundle.php \Drupal\views\Plugin\views\filter\Bundle::calculateDependencies()
- 11.x core/modules/views/src/Plugin/views/filter/Bundle.php \Drupal\views\Plugin\views\filter\Bundle::calculateDependencies()
Overrides HandlerBase::calculateDependencies
File
-
core/
modules/ views/ src/ Plugin/ views/ filter/ Bundle.php, line 125
Class
- Bundle
- Filter class which allows filtering by entity bundles.
Namespace
Drupal\views\Plugin\views\filterCode
public function calculateDependencies() {
$dependencies = parent::calculateDependencies();
$bundle_entity_type = $this->entityType
->getBundleEntityType();
$bundle_entity_storage = $this->entityTypeManager
->getStorage($bundle_entity_type);
foreach (array_keys($this->value) as $bundle) {
if ($bundle_entity = $bundle_entity_storage->load($bundle)) {
$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.