You are here

function purge_option_form in Purge 7.2

Form generator for option form.

1 call to purge_option_form()
OLDpurge_item_form in includes/purge_ui.inc
Menu callback for purge item settins. @TODO REMOVE THIS. Die old functional code, die!.

File

includes/purge_ui.inc, line 735
Provides administrative interface for the Purge module.

Code

function purge_option_form($option) {
  $form = array(
    '#title' => $option['name'],
    '#description' => $option['description'],
  );
  if (isset($option['values'])) {
    $form['#type'] = 'select';
    $form['#options'] = $option['values'];
  }
  else {
    $form['#type'] = 'checkbox';
  }
  if (isset($option['purger_value'])) {
    $form['#default_value'] = $option['purger_value'];
  }
  else {
    $form['#default_value'] = $option['default_value'];
  }
  return $form;
}