/**
* Implements \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionInterface::getContextDefinitions().
*/
public function getContextDefinitions() { return $this->contextDefinitions;
} /**
* Implements \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionInterface::getContextDefinition().
*/
public function getContextDefinition($name) { if ($this->
hasContextDefinition($name)) { return $this->contextDefinitions
[$name];
} throw new ContextException($this->
id() . " does not define a '
$name' context"
);
} /**
* Implements \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionInterface::addContextDefinition().
*/
public function addContextDefinition($name, ContextDefinitionInterface
$definition) { $this->contextDefinitions
[$name] =
$definition;
return $this;
}