You are here

class backstretch_context_reaction_backstretch in Backstretch 7

Same name and namespace in other branches
  1. 7.2 plugins/backstretch_context_reaction_backstretch.inc \backstretch_context_reaction_backstretch

Hierarchy

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

Namesort descending Modifiers Type Description Overrides
backstretch_context_reaction_backstretch::execute function
backstretch_context_reaction_backstretch::options_form function Overrides context_reaction::options_form
backstretch_context_reaction_backstretch::options_form_submit function Options form submit handler. Overrides context_reaction::options_form_submit
context_reaction::$description property
context_reaction::$plugin property
context_reaction::$title property
context_reaction::fetch_from_context function Retrieve options from the context provided. 1
context_reaction::get_contexts function Retrieve active contexts that have values for this reaction.
context_reaction::settings_form function Settings form. Provide variable settings for your reaction. 2
context_reaction::__clone function Clone our references when we're being cloned.
context_reaction::__construct function Constructor. Do not override.