function context_reaction_debug::execute in Context 7.3
Same name and namespace in other branches
- 6.3 plugins/context_reaction_debug.inc \context_reaction_debug::execute()
- 6 plugins/context_reaction_debug.inc \context_reaction_debug::execute()
Output a list of active contexts.
File
- plugins/
context_reaction_debug.inc, line 32
Class
- context_reaction_debug
- Output context debug information.
Code
function execute() {
$contexts = context_active_contexts();
foreach ($contexts as $context) {
if (!empty($context->reactions['debug']) || variable_get('context_reaction_debug_enable_global', FALSE)) {
if (user_access('administer site configuration') && module_exists('context_ui')) {
$name = l($context->name, "admin/structure/context/list/{$context->name}", array(
'query' => array(
'destination' => $_GET['q'],
),
));
}
else {
$name = check_plain($context->name);
}
drupal_set_message(t("Active context: !name", array(
'!name' => $name,
)));
}
}
}