function None::validateArgument
Same name in other branches
- 9 core/modules/views/src/Plugin/views/argument_validator/None.php \Drupal\views\Plugin\views\argument_validator\None::validateArgument()
- 8.9.x core/modules/views/src/Plugin/views/argument_validator/None.php \Drupal\views\Plugin\views\argument_validator\None::validateArgument()
- 10 core/modules/views/src/Plugin/views/argument_validator/None.php \Drupal\views\Plugin\views\argument_validator\None::validateArgument()
Overrides ArgumentValidatorPluginBase::validateArgument
File
-
core/
modules/ views/ src/ Plugin/ views/ argument_validator/ None.php, line 19
Class
- None
- Do not validate the argument.
Namespace
Drupal\views\Plugin\views\argument_validatorCode
public function validateArgument($argument) {
if (!empty($this->argument->options['must_not_be'])) {
return !isset($argument);
}
if (!isset($argument) || $argument === '') {
return FALSE;
}
if (!empty($this->argument->definition['numeric']) && !isset($this->argument->options['break_phrase'])) {
return FALSE;
}
return TRUE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.