You are here

public function PluginContextDefinitionInterface::setContextDefinitions in Plugin 8.2

Sets the context definitions.

Parameters

\Drupal\Component\Plugin\Context\ContextDefinitionInterface[] $context_definitions: The array of context definitions, keyed by context name.

Return value

$this

Throws

\InvalidArgumentException Thrown if the definitions are invalid.

1 method overrides PluginContextDefinitionInterface::setContextDefinitions()
ArrayPluginDefinitionDecorator::setContextDefinitions in src/PluginDefinition/ArrayPluginDefinitionDecorator.php
Sets the context definitions.

File

src/PluginDefinition/PluginContextDefinitionInterface.php, line 25

Class

PluginContextDefinitionInterface
Defines a plugin definition that includes contexts.

Namespace

Drupal\plugin\PluginDefinition

Code

public function setContextDefinitions(array $context_definitions);