You are here

public function NumericArgumentValidator::getContextDefinition in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/views/src/Plugin/views/argument_validator/NumericArgumentValidator.php \Drupal\views\Plugin\views\argument_validator\NumericArgumentValidator::getContextDefinition()

Returns a context definition for this argument.

Return value

\Drupal\Core\Plugin\Context\ContextDefinitionInterface|null A context definition that represents the argument or NULL if that is not possible.

Overrides ArgumentValidatorPluginBase::getContextDefinition

File

core/modules/views/src/Plugin/views/argument_validator/NumericArgumentValidator.php, line 26

Class

NumericArgumentValidator
Validate whether an argument is numeric or not.

Namespace

Drupal\views\Plugin\views\argument_validator

Code

public function getContextDefinition() {
  return new ContextDefinition('integer', $this->argument
    ->adminLabel(), FALSE);
}