Views argument validate plugins
Same name in other branches
- 9 core/modules/views/src/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php \Drupal\views\Plugin\views\argument_validator\views_argument_validate_plugins
- 8.9.x core/modules/views/src/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php \Drupal\views\Plugin\views\argument_validator\views_argument_validate_plugins
- 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
Parent topics
File
-
core/
modules/ views/ src/ Plugin/ views/ argument_validator/ ArgumentValidatorPluginBase.php, line 9
Classes
Title Sort descending | File name | Summary |
---|---|---|
ArgumentValidatorPluginBase | core/ |
Base argument validator plugin to provide basic functionality. |
None | core/ |
Do not validate the argument. |
NumericArgumentValidator | core/ |
Validate whether an argument is numeric or not. |
ViewsArgumentValidator | core/ |
Defines a ViewsArgumentValidator attribute object for plugin discovery. |
ViewsArgumentValidator | core/ |
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.