public function StringArgument::getContextDefinition in Drupal 8
Same name and namespace in other branches
- 9 core/modules/views/src/Plugin/views/argument/StringArgument.php \Drupal\views\Plugin\views\argument\StringArgument::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 ArgumentPluginBase::getContextDefinition
File
- core/
modules/ views/ src/ Plugin/ views/ argument/ StringArgument.php, line 325
Class
- StringArgument
- Basic argument handler to implement string arguments that may have length limits.
Namespace
Drupal\views\Plugin\views\argumentCode
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 string type.
return new ContextDefinition('string', $this
->adminLabel(), FALSE);
}