public function MediaDirectoryArgument::getContextDefinition in Media Directories 8
Same name and namespace in other branches
- 3.x src/Plugin/views/argument/MediaDirectoryArgument.php \Drupal\media_directories\Plugin\views\argument\MediaDirectoryArgument::getContextDefinition()
- 2.x src/Plugin/views/argument/MediaDirectoryArgument.php \Drupal\media_directories\Plugin\views\argument\MediaDirectoryArgument::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
- src/
Plugin/ views/ argument/ MediaDirectoryArgument.php, line 143
Class
- MediaDirectoryArgument
- Media directory argument plugin.
Namespace
Drupal\media_directories\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 integer type.
return new ContextDefinition('integer', $this
->adminLabel(), FALSE);
}