You are here

public function None::validateArgument in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 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 22
Contains \Drupal\views\Plugin\views\argument_validator\None.

Class

None
Do not validate the argument.

Namespace

Drupal\views\Plugin\views\argument_validator

Code

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']) && !is_numeric($arg)) {
    return FALSE;
  }
  return TRUE;
}