You are here

function openlayers_plus_behavior_blockswitcher::options_form in OpenLayers Plus 7

Same name and namespace in other branches
  1. 7.3 behaviors/openlayers_plus_behavior_blockswitcher.inc \openlayers_plus_behavior_blockswitcher::options_form()
  2. 7.2 behaviors/openlayers_plus_behavior_blockswitcher.inc \openlayers_plus_behavior_blockswitcher::options_form()

Override of options_form().

Overrides openlayers_behavior::options_form

File

behaviors/openlayers_plus_behavior_blockswitcher.inc, line 18

Class

openlayers_plus_behavior_blockswitcher

Code

function options_form($defaults = array()) {
  return array(
    'enabled' => array(
      '#type' => 'checkbox',
      '#title' => t('Show blockswitcher in map'),
      '#default_value' => isset($defaults['enabled']) ? $defaults['enabled'] : array(),
    ),
    'open' => array(
      '#type' => 'checkbox',
      '#title' => t('Show blockswitcher open when the map loads'),
      '#default_value' => isset($defaults['open']) ? $defaults['open'] : array(),
    ),
    'overlay_style' => array(
      '#type' => 'select',
      '#title' => t('Show overlay layers as checkboxes or radio buttons'),
      '#options' => array(
        'checkbox' => t('Checkboxes'),
        'radio' => t('Radio Buttons'),
      ),
      '#default_value' => isset($defaults['overlay_style']) ? $defaults['overlay_style'] : array(),
    ),
    'position' => array(
      '#type' => 'select',
      '#title' => t('Position'),
      '#options' => array(
        'ne' => t('Top right'),
        'se' => t('Bottom right'),
        'sw' => t('Bottom left'),
        'nw' => t('Top left'),
      ),
      '#default_value' => isset($defaults['position']) ? $defaults['position'] : array(),
    ),
  );
}