5c29411f32b284b689bb2eb7e1e19118701147df
[yaffs-website] / web / core / lib / Drupal / Core / Plugin / Context / ContextAwarePluginManagerInterface.php
1 <?php
2
3 namespace Drupal\Core\Plugin\Context;
4
5 use Drupal\Component\Plugin\PluginManagerInterface;
6
7 /**
8  * Provides an interface for plugin managers that support context-aware plugins.
9  */
10 interface ContextAwarePluginManagerInterface extends PluginManagerInterface {
11
12   /**
13    * Determines plugins whose constraints are satisfied by a set of contexts.
14    *
15    * @todo Use context definition objects after
16    *   https://www.drupal.org/node/2281635.
17    *
18    * @param \Drupal\Component\Plugin\Context\ContextInterface[] $contexts
19    *   An array of contexts.
20    *
21    * @return array
22    *   An array of plugin definitions.
23    */
24   public function getDefinitionsForContexts(array $contexts = []);
25
26 }