Implements \Drupal\Component\Plugin\ContextAwarePluginInterface::getContext().
Overrides ContextAwarePluginInterface::getContext
public function getContext($name) {
// Check for a valid context definition.
$this
->getContextDefinition($name);
// Check for a valid context value.
if (!isset($this->context[$name])) {
throw new PluginException("The {$name} context is not yet set.");
}
return $this->context[$name];
}