public function ArgumentPluginBase::validateArgument in Views (for Drupal 7) 8.3
Validate that this argument works. By default, all arguments are valid.
2 calls to ArgumentPluginBase::validateArgument()
- ArgumentPluginBase::set_argument in lib/
Drupal/ views/ Plugin/ views/ argument/ ArgumentPluginBase.php - Set the input for this argument
- ArgumentPluginBase::validate_argument in lib/
Drupal/ views/ Plugin/ views/ argument/ ArgumentPluginBase.php - Called by the menu system to validate an argument.
File
- lib/
Drupal/ views/ Plugin/ views/ argument/ ArgumentPluginBase.php, line 937 - Definition of Drupal\views\Plugin\views\argument\ArgumentPluginBase.
Class
- ArgumentPluginBase
- Base class for arguments.
Namespace
Drupal\views\Plugin\views\argumentCode
public function validateArgument($arg) {
// By using % in URLs, arguments could be validated twice; this eases
// that pain.
if (isset($this->argument_validated)) {
return $this->argument_validated;
}
if ($this
->is_exception($arg)) {
return $this->argument_validated = TRUE;
}
$plugin = $this
->get_plugin('argument_validator');
return $this->argument_validated = $plugin
->validate_argument($arg);
}