You are here

public function ContextHandlerInterface::filterPluginDefinitionsByContexts in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Plugin/Context/ContextHandlerInterface.php \Drupal\Core\Plugin\Context\ContextHandlerInterface::filterPluginDefinitionsByContexts()

Determines plugins whose constraints are satisfied by a set of contexts.

@todo Use context definition objects after https://www.drupal.org/node/2281635.

Parameters

\Drupal\Component\Plugin\Context\ContextInterface[] $contexts: An array of contexts.

array $definitions: An array of plugin definitions.

Return value

array An array of plugin definitions.

1 method overrides ContextHandlerInterface::filterPluginDefinitionsByContexts()
ContextHandler::filterPluginDefinitionsByContexts in core/lib/Drupal/Core/Plugin/Context/ContextHandler.php
Determines plugins whose constraints are satisfied by a set of contexts.

File

core/lib/Drupal/Core/Plugin/Context/ContextHandlerInterface.php, line 26

Class

ContextHandlerInterface
Provides an interface for handling sets of contexts.

Namespace

Drupal\Core\Plugin\Context

Code

public function filterPluginDefinitionsByContexts(array $contexts, array $definitions);