Mercurial > hg > isophonics-drupal-site
annotate core/lib/Drupal/Core/Plugin/ContextAwarePluginInterface.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 4c8ae668cc8c |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 namespace Drupal\Core\Plugin; |
Chris@0 | 4 |
Chris@0 | 5 use Drupal\Component\Plugin\ContextAwarePluginInterface as ComponentContextAwarePluginInterface; |
Chris@0 | 6 |
Chris@0 | 7 /** |
Chris@0 | 8 * An override of ContextAwarePluginInterface for documentation purposes. |
Chris@0 | 9 * |
Chris@0 | 10 * @see \Drupal\Component\Plugin\ContextAwarePluginInterface |
Chris@0 | 11 * |
Chris@0 | 12 * @ingroup plugin_api |
Chris@0 | 13 */ |
Chris@0 | 14 interface ContextAwarePluginInterface extends ComponentContextAwarePluginInterface { |
Chris@0 | 15 |
Chris@0 | 16 /** |
Chris@0 | 17 * Gets the context definitions of the plugin. |
Chris@0 | 18 * |
Chris@0 | 19 * @return \Drupal\Core\Plugin\Context\ContextDefinitionInterface[] |
Chris@0 | 20 * The array of context definitions, keyed by context name. |
Chris@0 | 21 */ |
Chris@0 | 22 public function getContextDefinitions(); |
Chris@0 | 23 |
Chris@0 | 24 /** |
Chris@0 | 25 * Gets a specific context definition of the plugin. |
Chris@0 | 26 * |
Chris@0 | 27 * @param string $name |
Chris@0 | 28 * The name of the context in the plugin definition. |
Chris@0 | 29 * |
Chris@0 | 30 * @return \Drupal\Core\Plugin\Context\ContextDefinitionInterface |
Chris@0 | 31 * The definition against which the context value must validate. |
Chris@0 | 32 * |
Chris@0 | 33 * @throws \Drupal\Component\Plugin\Exception\PluginException |
Chris@0 | 34 * If the requested context is not defined. |
Chris@0 | 35 */ |
Chris@0 | 36 public function getContextDefinition($name); |
Chris@0 | 37 |
Chris@0 | 38 } |