class olark_context_reaction_add in Olark Chat 7
Same name and namespace in other branches
- 6 plugins/olark_context_reaction_add.inc \olark_context_reaction_add
Add Olark code to the page.
Hierarchy
- class \context_reaction
- class \olark_context_reaction_add
Expanded class hierarchy of olark_context_reaction_add
2 string references to 'olark_context_reaction_add'
- olark_context_plugins in ./
olark.module - CTools plugin API hook for Context.
- olark_context_registry in ./
olark.module - Implements hook_context_registry().
File
- plugins/
olark_context_reaction_add.inc, line 11 - Adds a Context module reaction for the Olark module.
View source
class olark_context_reaction_add extends context_reaction {
/**
* Builds and options form for Olark context.
*/
public function options_form($context) {
return array(
'add' => array(
'#type' => 'value',
'#value' => TRUE,
),
'note' => array(
'#type' => 'markup',
'#value' => t('Olark chat code will be added to the page.'),
),
);
}
/**
* Submit handler for the options form.
*/
public function options_form_submit($values) {
return array(
'add' => 1,
);
}
/**
* Execute the contexts.
*/
public function execute() {
$contexts = $this
->get_contexts();
foreach ($contexts as $context) {
if (!empty($context->reactions[$this->plugin])) {
return TRUE;
}
}
}
}
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 | 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. | ||
olark_context_reaction_add:: |
public | function | Execute the contexts. | |
olark_context_reaction_add:: |
public | function |
Builds and options form for Olark context. Overrides context_reaction:: |
|
olark_context_reaction_add:: |
public | function |
Submit handler for the options form. Overrides context_reaction:: |