function NumericArgument::getContextDefinition

Same name in other branches
  1. 8.9.x core/modules/views/src/Plugin/views/argument/NumericArgument.php \Drupal\views\Plugin\views\argument\NumericArgument::getContextDefinition()
  2. 10 core/modules/views/src/Plugin/views/argument/NumericArgument.php \Drupal\views\Plugin\views\argument\NumericArgument::getContextDefinition()
  3. 11.x core/modules/views/src/Plugin/views/argument/NumericArgument.php \Drupal\views\Plugin\views\argument\NumericArgument::getContextDefinition()

Overrides ArgumentPluginBase::getContextDefinition

File

core/modules/views/src/Plugin/views/argument/NumericArgument.php, line 132

Class

NumericArgument
Basic argument handler for arguments that are numeric.

Namespace

Drupal\views\Plugin\views\argument

Code

public function getContextDefinition() {
    if ($context_definition = parent::getContextDefinition()) {
        return $context_definition;
    }
    // If the parent does not provide a context definition through the
    // validation plugin, fall back to the integer type.
    return new ContextDefinition('integer', $this->adminLabel(), FALSE);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.