class olark_context_reaction_add in Olark Chat 6
Same name and namespace in other branches
- 7 plugins/olark_context_reaction_add.inc \olark_context_reaction_add
Add Olark code to the page.
Hierarchy
- class \olark_context_reaction_add extends \context_reaction
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 12 
- Adds a Context module reaction for the Olark module.
View source
class olark_context_reaction_add extends context_reaction {
  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.'),
      ),
    );
  }
  function options_form_submit($values) {
    return array(
      'add' => 1,
    );
  }
  function execute() {
    $contexts = $this
      ->get_contexts();
    foreach ($contexts as $context) {
      if (!empty($context->reactions[$this->plugin])) {
        return TRUE;
      }
    }
  }
} 
      