function ContextHandlerInterface::getMatchingContexts

Same name in other branches
  1. 9 core/lib/Drupal/Core/Plugin/Context/ContextHandlerInterface.php \Drupal\Core\Plugin\Context\ContextHandlerInterface::getMatchingContexts()
  2. 8.9.x core/lib/Drupal/Core/Plugin/Context/ContextHandlerInterface.php \Drupal\Core\Plugin\Context\ContextHandlerInterface::getMatchingContexts()
  3. 11.x core/lib/Drupal/Core/Plugin/Context/ContextHandlerInterface.php \Drupal\Core\Plugin\Context\ContextHandlerInterface::getMatchingContexts()

Determines which contexts satisfy the constraints of a given definition.

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

Parameters

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

\Drupal\Core\Plugin\Context\ContextDefinitionInterface $definition: The definition to satisfy.

Return value

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

File

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

Class

ContextHandlerInterface
Provides an interface for handling sets of contexts.

Namespace

Drupal\Core\Plugin\Context

Code

public function getMatchingContexts(array $contexts, ContextDefinitionInterface $definition);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.