diff --git a/core/lib/Drupal/Core/Plugin/Context/ContextProviderInterface.php b/core/lib/Drupal/Core/Plugin/Context/ContextProviderInterface.php index 81969aa..c033449 100644 --- a/core/lib/Drupal/Core/Plugin/Context/ContextProviderInterface.php +++ b/core/lib/Drupal/Core/Plugin/Context/ContextProviderInterface.php @@ -31,7 +31,7 @@ * @param \Drupal\Core\Plugin\Context\ContextCollection $collection * The collection to which to add the available contexts. */ - public function getActiveContext(ContextCollection $collection); + public function getActiveContexts(ContextCollection $collection); /** * Determines the available configuration-time contexts. @@ -48,7 +48,7 @@ public function getActiveContext(ContextCollection $collection); * // available, and provide its definition, so that context aware plugins * // can be configured to use it. When the plugin, for example a block, * // needs to evaluate the context, the value of this context will be - * // supplied by getActiveContext(). + * // supplied by getActiveContexts(). * $context = new Context(new ContextDefinition('entity:node')); * $collection->setContext('node.node', $context); * @endcode @@ -58,6 +58,6 @@ public function getActiveContext(ContextCollection $collection); * * @see static::getActiveContext() */ - public function getAdministrativeContext(ContextCollection $collection); + public function getAdministrativeContexts(ContextCollection $collection); } diff --git a/core/lib/Drupal/Core/Plugin/Context/ContextStackManager.php b/core/lib/Drupal/Core/Plugin/Context/ContextStackManager.php index e137425..f99634a 100644 --- a/core/lib/Drupal/Core/Plugin/Context/ContextStackManager.php +++ b/core/lib/Drupal/Core/Plugin/Context/ContextStackManager.php @@ -69,7 +69,7 @@ public function getAdministrativeContexts() { $stack = new ContextStack([]); foreach ($this->contexts as $id) { $collection = new ContextCollection($id); - $this->container->get($id)->getAdministrativeContext($collection); + $this->container->get($id)->getAdministrativeContexts($collection); $stack->addContextCollection($collection); } diff --git a/core/modules/block/src/ContextProvider/CurrentLanguageContext.php b/core/modules/block/src/ContextProvider/CurrentLanguageContext.php index 6a68a14..e4a45fa 100644 --- a/core/modules/block/src/ContextProvider/CurrentLanguageContext.php +++ b/core/modules/block/src/ContextProvider/CurrentLanguageContext.php @@ -42,7 +42,7 @@ public function __construct(LanguageManagerInterface $language_manager) { /** * {@inheritdoc} */ - public function getActiveContext(ContextCollection $collection) { + public function getActiveContexts(ContextCollection $collection) { // Add a context for each language type. $language_types = $this->languageManager->getLanguageTypes(); $info = $this->languageManager->getDefinedLanguageTypesInfo(); @@ -63,8 +63,8 @@ public function getActiveContext(ContextCollection $collection) { /** * {@inheritdoc} */ - public function getAdministrativeContext(ContextCollection $collection) { - $this->getActiveContext($collection); + public function getAdministrativeContexts(ContextCollection $collection) { + $this->getActiveContexts($collection); } } diff --git a/core/modules/block/src/ContextProvider/CurrentUserContext.php b/core/modules/block/src/ContextProvider/CurrentUserContext.php index 6ad3ed8..94f41ab 100644 --- a/core/modules/block/src/ContextProvider/CurrentUserContext.php +++ b/core/modules/block/src/ContextProvider/CurrentUserContext.php @@ -53,7 +53,7 @@ public function __construct(AccountInterface $account, EntityManagerInterface $e /** * {@inheritdoc} */ - public function getActiveContext(ContextCollection $collection) { + public function getActiveContexts(ContextCollection $collection) { $current_user = $this->userStorage->load($this->account->id()); $context = new Context(new ContextDefinition('entity:user', $this->t('Current user'))); @@ -67,8 +67,8 @@ public function getActiveContext(ContextCollection $collection) { /** * {@inheritdoc} */ - public function getAdministrativeContext(ContextCollection $collection) { - $this->getActiveContext($collection); + public function getAdministrativeContexts(ContextCollection $collection) { + $this->getActiveContexts($collection); } } diff --git a/core/modules/block/src/ContextProvider/NodeRouteContext.php b/core/modules/block/src/ContextProvider/NodeRouteContext.php index e009c8b..e517e4e 100644 --- a/core/modules/block/src/ContextProvider/NodeRouteContext.php +++ b/core/modules/block/src/ContextProvider/NodeRouteContext.php @@ -40,7 +40,7 @@ public function __construct(RouteMatchInterface $route_match) { /** * {@inheritdoc} */ - public function getActiveContext(ContextCollection $collection) { + public function getActiveContexts(ContextCollection $collection) { $context = new Context(new ContextDefinition('entity:node', NULL, FALSE)); if (($route_object = $this->routeMatch->getRouteObject()) && ($route_contexts = $route_object->getOption('parameters')) && isset($route_contexts['node'])) { if ($node = $this->routeMatch->getParameter('node')) { @@ -61,7 +61,7 @@ public function getActiveContext(ContextCollection $collection) { /** * {@inheritdoc} */ - public function getAdministrativeContext(ContextCollection $collection) { + public function getAdministrativeContexts(ContextCollection $collection) { $context = new Context(new ContextDefinition('entity:node')); $collection->setContext('node.node', $context); }