You are here

function DynamicBackgroundReaction::options_form in Dynamic Background 7.2

Same name and namespace in other branches
  1. 6 modules/dynamic_background_context/plugins/dynamic_background_context_reaction.inc \DynamicBackgroundReaction::options_form()
  2. 7 modules/dynamic_background_context/plugins/dynamic_background_context_reaction.inc \DynamicBackgroundReaction::options_form()

Overrides context_reaction::options_form

File

modules/dynamic_background_context/plugins/dynamic_background_context_reaction.inc, line 10
Implements a new context reaction that can be used to set dynamic background images based on context.

Class

DynamicBackgroundReaction
@file Implements a new context reaction that can be used to set dynamic background images based on context.

Code

function options_form($context) {
  $form = array();
  $form['dynamic_background'] = array(
    '#type' => 'fieldset',
    '#title' => t('Dynamic background'),
    '#description' => t('Select the image that you want for the current context.'),
    '#collapsed' => FALSE,
    '#collapsible' => TRUE,
    '#tree' => TRUE,
  );

  // Add the image selection part of the form.
  $form['dynamic_background'] += dynamic_background_image_selector_form('context', $context->name);
  return $form;
}