Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / lib / Drupal / Core / Plugin / Context / ContextRepositoryInterface.php
1 <?php
2
3 namespace Drupal\Core\Plugin\Context;
4
5 /**
6  * Offers a global context repository.
7  *
8  * Provides a list of all available contexts, which is mostly useful for
9  * configuration on forms, as well as a method to get the concrete contexts with
10  * their values, given a list of fully qualified context IDs.
11  *
12  * @see \Drupal\Core\Plugin\Context\ContextProviderInterface
13  */
14 interface ContextRepositoryInterface {
15
16   /**
17    * Gets runtime context values for the given context IDs.
18    *
19    * Given that context providers might not return contexts for the given
20    * context IDs, it is also not guaranteed that the context repository returns
21    * contexts for all specified IDs.
22    *
23    * @param string[] $context_ids
24    *   Fully qualified context IDs, which looks like
25    *   @{service_id}:{unqualified_context_id}, so for example
26    *   node.node_route_context:node.
27    *
28    * @return \Drupal\Core\Plugin\Context\ContextInterface[]
29    *   The determined contexts, keyed by the fully qualified context ID.
30    */
31   public function getRuntimeContexts(array $context_ids);
32
33   /**
34    * Gets all available contexts for the purposes of configuration.
35    *
36    * @return \Drupal\Core\Plugin\Context\ContextInterface[]
37    *   All available contexts.
38    */
39   public function getAvailableContexts();
40
41 }