Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / lib / Drupal / Core / Plugin / ContextAwarePluginInterface.php
1 <?php
2
3 namespace Drupal\Core\Plugin;
4
5 use Drupal\Component\Plugin\ContextAwarePluginInterface as ComponentContextAwarePluginInterface;
6
7 /**
8  * An override of ContextAwarePluginInterface for documentation purposes.
9  *
10  * @see \Drupal\Component\Plugin\ContextAwarePluginInterface
11  *
12  * @ingroup plugin_api
13  */
14 interface ContextAwarePluginInterface extends ComponentContextAwarePluginInterface {
15
16   /**
17    * Gets the context definitions of the plugin.
18    *
19    * @return \Drupal\Core\Plugin\Context\ContextDefinitionInterface[]
20    *   The array of context definitions, keyed by context name.
21    */
22   public function getContextDefinitions();
23
24   /**
25    * Gets a specific context definition of the plugin.
26    *
27    * @param string $name
28    *   The name of the context in the plugin definition.
29    *
30    * @return \Drupal\Core\Plugin\Context\ContextDefinitionInterface
31    *   The definition against which the context value must validate.
32    *
33    * @throws \Drupal\Component\Plugin\Exception\PluginException
34    *   If the requested context is not defined.
35    */
36   public function getContextDefinition($name);
37
38 }