function ContextHandlerInterface::checkRequirements

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

Checks a set of requirements against 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 available contexts.

\Drupal\Core\TypedData\DataDefinitionInterface[] $requirements: An array of requirements.

Return value

bool TRUE if all of the requirements are satisfied by the context, FALSE otherwise.

1 method overrides ContextHandlerInterface::checkRequirements()
ContextHandler::checkRequirements in core/lib/Drupal/Core/Plugin/Context/ContextHandler.php
Checks a set of requirements against a set of contexts.

File

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

Class

ContextHandlerInterface
Provides an interface for handling sets of contexts.

Namespace

Drupal\Core\Plugin\Context

Code

public function checkRequirements(array $contexts, array $requirements);

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