You are here

function context_reaction::get_contexts in Context 6

Same name and namespace in other branches
  1. 6.3 plugins/context_reaction.inc \context_reaction::get_contexts()
  2. 7.3 plugins/context_reaction.inc \context_reaction::get_contexts()

Retrieve active contexts that have values for this reaction.

4 calls to context_reaction::get_contexts()
context_layouts_reaction_block::get_active_layout in context_layouts/plugins/context_layouts_reaction_block.inc
Retrieve the first layout specified found by any active contexts.
context_reaction_css_injector::execute in plugins/context_reaction_css_injector.inc
context_reaction_menu::get_active_paths in plugins/context_reaction_menu.inc
context_reaction_theme::execute in plugins/context_reaction_theme.inc
Set 'section_title', and 'section_subtitle' if not set and merge all additional classes onto the 'body_classes'.

File

plugins/context_reaction.inc, line 69

Class

context_reaction
Base class for a context reaction.

Code

function get_contexts() {
  $contexts = array();
  foreach (context_active_contexts() as $context) {
    if ($this
      ->fetch_from_context($context)) {
      $contexts[$context->name] = $context;
    }
  }
  return $contexts;
}