Views argument validate plugins

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php \Drupal\views\Plugin\views\argument_validator\views_argument_validate_plugins
  2. 8.9.x core/modules/views/src/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php \Drupal\views\Plugin\views\argument_validator\views_argument_validate_plugins
  3. 10 core/modules/views/src/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php \Drupal\views\Plugin\views\argument_validator\views_argument_validate_plugins

Plugins for validating views contextual filters.

Views argument validator plugins validate arguments (contextual filters) on views. They can ensure arguments are valid, and even do transformations on the arguments. They can also provide replacement patterns for the view title. For example, the 'content' validator verifies that the argument value corresponds to a node, loads that node, and provides the node title as a replacement pattern for the view title.

Argument validator plugins extend \Drupal\views\Plugin\views\argument_validator\ArgumentValidatorPluginBase. They must be annotated with \Drupal\views\Annotation\ViewsArgumentValidator annotation, and they must be in namespace directory Plugin\views\argument_validator.

See also

Plugin API

Parent topics

File

core/modules/views/src/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php, line 9

Classes

Title Sort descending File name Summary
ArgumentValidatorPluginBase core/modules/views/src/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php Base argument validator plugin to provide basic functionality.
None core/modules/views/src/Plugin/views/argument_validator/None.php Do not validate the argument.
NumericArgumentValidator core/modules/views/src/Plugin/views/argument_validator/NumericArgumentValidator.php Validate whether an argument is numeric or not.
ViewsArgumentValidator core/modules/views/src/Attribute/ViewsArgumentValidator.php Defines a ViewsArgumentValidator attribute object for plugin discovery.
ViewsArgumentValidator core/modules/views/src/Annotation/ViewsArgumentValidator.php Defines a Plugin annotation object for views argument validator plugins.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.