You are here

function context_enabled_contexts in Context 7.3

Same name and namespace in other branches
  1. 6.3 context.module \context_enabled_contexts()
  2. 6 context.module \context_enabled_contexts()
  3. 6.2 context.module \context_enabled_contexts()

Wrapper around context_load() that only returns enabled contexts.

1 call to context_enabled_contexts()
context_condition_map in ./context.module
Loads an associative array of conditions => context identifiers to allow contexts to be set by different conditions.

File

./context.module, line 411

Code

function context_enabled_contexts($reset = FALSE) {
  $enabled = array();
  foreach (context_load(NULL, $reset) as $context) {
    if (empty($context->disabled)) {
      $enabled[$context->name] = $context;
    }
  }
  return $enabled;
}