3 namespace Drupal\Core\Plugin;
5 use Drupal\Component\Plugin\ContextAwarePluginInterface as ComponentContextAwarePluginInterface;
8 * An override of ContextAwarePluginInterface for documentation purposes.
10 * @see \Drupal\Component\Plugin\ContextAwarePluginInterface
14 interface ContextAwarePluginInterface extends ComponentContextAwarePluginInterface {
17 * Gets the context definitions of the plugin.
19 * @return \Drupal\Core\Plugin\Context\ContextDefinitionInterface[]
20 * The array of context definitions, keyed by context name.
22 public function getContextDefinitions();
25 * Gets a specific context definition of the plugin.
28 * The name of the context in the plugin definition.
30 * @return \Drupal\Core\Plugin\Context\ContextDefinitionInterface
31 * The definition against which the context value must validate.
33 * @throws \Drupal\Component\Plugin\Exception\PluginException
34 * If the requested context is not defined.
36 public function getContextDefinition($name);