public function ContextManager::getActiveContexts in Context 8
Same name and namespace in other branches
- 8.4 src/ContextManager.php \Drupal\context\ContextManager::getActiveContexts()
- 8.0 src/ContextManager.php \Drupal\context\ContextManager::getActiveContexts()
Get the evaluated and active contexts.
Return value
\Drupal\context\ContextInterface[]
1 call to ContextManager::getActiveContexts()
- ContextManager::getActiveReactions in src/
ContextManager.php - Get all active reactions or reactions of a certain type.
File
- src/
ContextManager.php, line 184
Class
- ContextManager
- This is the manager service for the context module and should not be confused with the built in contexts in Drupal.
Namespace
Drupal\contextCode
public function getActiveContexts() {
if ($this
->conditionsHasBeenEvaluated()) {
return $this->activeContexts;
}
$this
->evaluateContexts();
return $this->activeContexts;
}