function ViewsEntityArgumentValidator::getDerivativeDefinitions
Overrides DeriverBase::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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.