/** * {@inheritdoc} */ public function setContext($name, ComponentContextInterface $context) { // Check that the context passed is an instance of our extended interface. if (!$context instanceof ContextInterface) { throw new ContextException("Passed {$name} context must be an instance of \\Drupal\\Core\\Plugin\\Context\\ContextInterface"); } parent::setContext($name, $context); }
/** * {@inheritdoc} * * @return \Drupal\Core\Plugin\Context\ContextDefinitionInterface */ public function getContextDefinition($name) { return parent::getContextDefinition($name); }
/** * {@inheritdoc} * * @return \Drupal\Core\Plugin\Context\ContextDefinitionInterface[] */ public function getContextDefinitions() { return parent::getContextDefinitions(); }