public function evaluateContexts(array $provided = []) {

    $this->activeContexts = [];

    /** @var \Drupal\context\ContextInterface $context */
    foreach ($this->getContexts() as $context) {
      if ($this->evaluateContextConditions($context, $provided) && !$context->disabled()) {
        $this->activeContexts[$context->id()] = $context;
      }
    }

    $this->contextConditionsEvaluated = TRUE;
  }
public function evaluateContexts(array $provided = []) {

    $this->activeContexts = [];

    /** @var \Drupal\context\ContextInterface $context */
    foreach ($this->getContexts() as $context) {
      if ($this->evaluateContextConditions($context, $provided) && !$context->disabled()) {
        $this->activeContexts[$context->id()] = $context;
      }
    }

    $this->contextConditionsEvaluated = TRUE;
  }
public function evaluateContexts ( array $ provided = [ ] ) { $ this -> activeContexts = [ ] ; /** @var \Drupal\context\ContextInterface $context */ foreach ( $ this -> getContexts ( ) as $ context ) { if ( $ this -> evaluateContextConditions ( $ context , $ provided ) && ! $ context -> disabled ( ) ) { $ this -> activeContexts [ $ context -> id ( ) ] = $ context ; } } $ this -> contextConditionsEvaluated = TRUE ; }
Evaluate all context conditions.

@param \Drupal\Core\Plugin\Context\Context[] $provided
Additional provided (core) contexts to apply to Conditions.
Evaluate all context conditions .