class supersized_context_reaction in Supersized 7
Same name and namespace in other branches
- 8 supersized_context/supersized_context_reaction.inc \supersized_context_reaction
@file Reaction class of supersized.
To apply Supersized.
Hierarchy
- class \context_reaction
- class \supersized_context_reaction
Expanded class hierarchy of supersized_context_reaction
2 string references to 'supersized_context_reaction'
- supersized_context_context_plugins in supersized_context/
supersized_context.module - Implements hook_context_plugins().
- supersized_context_context_registry in supersized_context/
supersized_context.module - Implements hook_context_registry().
File
- supersized_context/
supersized_context_reaction.inc, line 9 - Reaction class of supersized.
View source
class supersized_context_reaction extends context_reaction {
/**
* Construct option form.
*/
function options_form($context) {
$values = $this
->fetch_from_context($context);
$form['#tree'] = TRUE;
$form['nid'] = array(
'#type' => 'textfield',
'#title' => t('Content'),
'#autocomplete_path' => 'supersized/autocomplete',
'#maxlength' => 1024,
'#default_value' => $values ? $values['nid'] : NULL,
'#description' => t('Slides of the content will be used as the supersized.'),
);
return $form;
}
/**
* See if context contains redirect reaction.
*/
function execute() {
$contexts = context_active_contexts();
foreach ($contexts as $context) {
if (!empty($context->reactions[$this->plugin])) {
preg_match('/\\[nid: (\\d+)\\]$/', $context->reactions[$this->plugin]['nid'], $matches);
$nid = $matches[1];
return $nid;
}
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
context_reaction:: |
property | |||
context_reaction:: |
property | |||
context_reaction:: |
property | |||
context_reaction:: |
function | Retrieve options from the context provided. | 1 | |
context_reaction:: |
function | Retrieve active contexts that have values for this reaction. | ||
context_reaction:: |
function | Options form submit handler. | 3 | |
context_reaction:: |
function | Settings form. Provide variable settings for your reaction. | 2 | |
context_reaction:: |
function | Clone our references when we're being cloned. | ||
context_reaction:: |
function | Constructor. Do not override. | ||
supersized_context_reaction:: |
function | See if context contains redirect reaction. | ||
supersized_context_reaction:: |
function |
Construct option form. Overrides context_reaction:: |