You are here

function dynamic_background_image_behaviour_form in Dynamic Background 7.2

Build the image behaviour form, which can be used in sub-modules to add support for image behaviour, such as the default random image.

Parameters

string $form_key:

Return value

type

7 calls to dynamic_background_image_behaviour_form()
dynamic_background_blog_settings_form in modules/dynamic_background_blog/dynamic_background_blog.module
Build the administration interface for dynamic background nodes and enables administrators to select which content types have enable background selection.
dynamic_background_context_settings_form in modules/dynamic_background_context/dynamic_background_context.module
Build the administration interface for dynamic background context and enables administrators to set image style and css targets.
dynamic_background_node_settings_form in modules/dynamic_background_node/dynamic_background_node.module
Build the administration interface for dynamic background nodes.
dynamic_background_panels_settings_form in modules/dynamic_background_panels/dynamic_background_panels.module
Build the administration interface for dynamic background panels and enables administrators enter css to used for insertion of backgrounds.
dynamic_background_settings_form in ./dynamic_background.module
The dynamic background administration settings form.

... See full list

File

./dynamic_background.module, line 237
This module enables administrators to upload images used as background on the site. The selected background image link is exposed as either $background in the page.tpl file or as /background.css.

Code

function dynamic_background_image_behaviour_form($form_key) {
  $form = array();
  $default = variable_get($form_key, array());
  $form[$form_key] = array(
    '#type' => 'fieldset',
    '#title' => t('Image behaviour'),
    '#collapsed' => TRUE,
    '#collapsible' => TRUE,
    '#tree' => TRUE,
  );
  $form[$form_key]['random'] = array(
    '#type' => 'checkbox',
    '#title' => t('Random image'),
    '#description' => t('If no image is selected and this is checked a random image will be selected.'),
    '#default_value' => isset($default['random']) ? $default['random'] : 0,
  );
  return $form;
}