You are here

public function PluginContextDefinitionTrait::setContextDefinitions in Plugin 8.2

Implements \Drupal\Component\Plugin\PluginContextDefinitionInterface::setContextDefinitions().

File

src/PluginDefinition/PluginContextDefinitionTrait.php, line 24

Class

PluginContextDefinitionTrait
Implements \Drupal\Component\Plugin\PluginContextDefinitionInterface.

Namespace

Drupal\plugin\PluginDefinition

Code

public function setContextDefinitions(array $context_definitions) {
  PluginDefinitionValidator::validateContextDefinitions($context_definitions);
  $this->contextDefinitions = $context_definitions;
  return $this;
}