class backstretch_context_reaction_backstretch in Backstretch 7
Same name and namespace in other branches
- 7.2 plugins/backstretch_context_reaction_backstretch.inc \backstretch_context_reaction_backstretch
Hierarchy
- class \context_reaction
Expanded class hierarchy of backstretch_context_reaction_backstretch
1 string reference to 'backstretch_context_reaction_backstretch'
- backstretch_context_plugins in ./
backstretch.module - Implmenets hook_context_plugins().
File
- plugins/
backstretch_context_reaction_backstretch.inc, line 3
View source
class backstretch_context_reaction_backstretch extends context_reaction {
function options_form($context) {
$values = $this
->fetch_from_context($context);
return array(
'backstretch_url' => array(
'#type' => 'textfield',
'#value' => isset($values['backstretch_url']) ? $values['backstretch_url'] : '',
'#title' => t('Backstretch URL'),
),
);
}
function options_form_submit($values) {
return array(
'backstretch_url' => $values['backstretch_url'],
);
}
function execute() {
foreach ($this
->get_contexts() as $context) {
if (!empty($context->reactions[$this->plugin])) {
global $conf;
$conf['backstretch_image_url'] = $context->reactions[$this->plugin]['backstretch_url'];
}
}
return array();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
backstretch_context_reaction_backstretch:: |
function | |||
backstretch_context_reaction_backstretch:: |
function |
Overrides context_reaction:: |
||
backstretch_context_reaction_backstretch:: |
function |
Options form submit handler. Overrides context_reaction:: |
||
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 | 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. |