class context_reaction_debug in Context 6.3
Same name and namespace in other branches
- 6 plugins/context_reaction_debug.inc \context_reaction_debug
- 7.3 plugins/context_reaction_debug.inc \context_reaction_debug
Output context debug information.
Hierarchy
- class \context_reaction
- class \context_reaction_debug
Expanded class hierarchy of context_reaction_debug
2 string references to 'context_reaction_debug'
- _context_context_plugins in ./
context.plugins.inc - Context plugins.
- _context_context_registry in ./
context.plugins.inc - Context registry.
File
- plugins/
context_reaction_debug.inc, line 6
View source
class context_reaction_debug extends context_reaction {
function options_form($context) {
return array(
'debug' => array(
'#type' => 'value',
'#value' => TRUE,
),
);
}
function options_form_submit($values) {
return array(
'debug' => 1,
);
}
/**
* Output a list of active contexts.
*/
function execute() {
$contexts = context_active_contexts();
foreach ($contexts as $context) {
if (!empty($context->reactions['debug'])) {
if (user_access('administer site configuration') && module_exists('context_ui')) {
$name = l($context->name, "admin/build/context/list/{$context->name}", array(
'query' => 'destination=' . $_GET['q'],
));
}
else {
$name = check_plain($context->name);
}
drupal_set_message(t("Active context: !name", array(
'!name' => $name,
)));
}
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
context_reaction:: |
property | |||
context_reaction:: |
property | |||
context_reaction:: |
property | |||
context_reaction:: |
function | Retrieve options from the context provided. | ||
context_reaction:: |
function | Retrieve active contexts that have values for this reaction. | ||
context_reaction:: |
function | Settings form. Provide variable settings for your reaction. | 1 | |
context_reaction:: |
function | Clone our references when we're being cloned. | ||
context_reaction:: |
function | Constructor. Do not override. | ||
context_reaction_debug:: |
function | Output a list of active contexts. | ||
context_reaction_debug:: |
function |
Overrides context_reaction:: |
||
context_reaction_debug:: |
function |
Options form submit handler. Overrides context_reaction:: |