Browse Source

Only reset when Islandora's ContextProviders are being used.

pull/932/head
Jordan Dukart 2 years ago
parent
commit
bb2e900ed6
  1. 6
      src/IslandoraContextManager.php

6
src/IslandoraContextManager.php

@ -31,8 +31,10 @@ class IslandoraContextManager extends ContextManager {
$this->activeContexts = [];
// XXX: Ensure that no earlier executed contexts in the request are still
// present.
$this->resetContextEvaluation();
// present when being triggered via Islandora's ContextProviders.
if (!empty($provided)) {
$this->resetContextEvaluation();
}
/** @var \Drupal\context\ContextInterface $context */
foreach ($this->getContexts() as $context) {
if ($this->evaluateContextConditions($context, $provided) && !$context->disabled()) {

Loading…
Cancel
Save