function ArgumentPluginBase::getContextDefinition

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php \Drupal\views\Plugin\views\argument\ArgumentPluginBase::getContextDefinition()
  2. 8.9.x core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php \Drupal\views\Plugin\views\argument\ArgumentPluginBase::getContextDefinition()
  3. 11.x core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php \Drupal\views\Plugin\views\argument\ArgumentPluginBase::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.

2 methods override ArgumentPluginBase::getContextDefinition()
NumericArgument::getContextDefinition in core/modules/views/src/Plugin/views/argument/NumericArgument.php
Returns a context definition for this argument.
StringArgument::getContextDefinition in core/modules/views/src/Plugin/views/argument/StringArgument.php
Returns a context definition for this argument.

File

core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php, line 1400

Class

ArgumentPluginBase
Base class for argument (contextual filter) handler plugins.

Namespace

Drupal\views\Plugin\views\argument

Code

public function getContextDefinition() {
    return $this->getPlugin('argument_validator')
        ->getContextDefinition();
}

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