public function PluginContextDefinitionInterface::setContextDefinition in Plugin 8.2
Sets a specific context definition.
Parameters
string $name: The name of the context in the plugin definition.
\Drupal\Component\Plugin\Context\ContextDefinitionInterface $context_definition: The context definition to set.
Return value
$this
1 method overrides PluginContextDefinitionInterface::setContextDefinition()
- ArrayPluginDefinitionDecorator::setContextDefinition in src/
PluginDefinition/ ArrayPluginDefinitionDecorator.php - Sets a specific context definition.
File
- src/
PluginDefinition/ PluginContextDefinitionInterface.php, line 45
Class
- PluginContextDefinitionInterface
- Defines a plugin definition that includes contexts.
Namespace
Drupal\plugin\PluginDefinitionCode
public function setContextDefinition($name, ContextDefinitionInterface $context_definition);