public function ContextHandlerInterface::getMatchingContexts in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Plugin/Context/ContextHandlerInterface.php \Drupal\Core\Plugin\Context\ContextHandlerInterface::getMatchingContexts()
- 9 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.
1 method overrides ContextHandlerInterface::getMatchingContexts()
- ContextHandler::getMatchingContexts in core/
lib/ Drupal/ Core/ Plugin/ Context/ ContextHandler.php - Determines which contexts satisfy the constraints of a given definition.
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\ContextCode
public function getMatchingContexts(array $contexts, ContextDefinitionInterface $definition);