public function ViewsEntityArgumentValidator::getDerivativeDefinitions in Drupal 10
Same name and namespace in other branches
- 8 core/modules/views/src/Plugin/Derivative/ViewsEntityArgumentValidator.php \Drupal\views\Plugin\Derivative\ViewsEntityArgumentValidator::getDerivativeDefinitions()
- 9 core/modules/views/src/Plugin/Derivative/ViewsEntityArgumentValidator.php \Drupal\views\Plugin\Derivative\ViewsEntityArgumentValidator::getDerivativeDefinitions()
File
- core/
modules/ views/ src/ Plugin/ Derivative/ ViewsEntityArgumentValidator.php, line 73
Class
- ViewsEntityArgumentValidator
- Provides views argument validator plugin definitions for all entity types.
Namespace
Drupal\views\Plugin\DerivativeCode
public function getDerivativeDefinitions($base_plugin_definition) {
$entity_types = $this->entityTypeManager
->getDefinitions();
$this->derivatives = [];
foreach ($entity_types as $entity_type_id => $entity_type) {
$this->derivatives[$entity_type_id] = [
'id' => 'entity:' . $entity_type_id,
'provider' => 'views',
'title' => $entity_type
->getLabel(),
'help' => $this
->t('Validate @label', [
'@label' => $entity_type
->getLabel(),
]),
'entity_type' => $entity_type_id,
'class' => $base_plugin_definition['class'],
];
}
return $this->derivatives;
}