You are here

function helper_settings_form in Helper 7

1 string reference to 'helper_settings_form'
helper_menu in ./helper.module
Implements hook_menu().

File

./helper.admin.inc, line 6

Code

function helper_settings_form($form) {
  $tweaks = helper_get_tweaks();
  $options = ArrayHelper::extractNestedValuesToArray($tweaks, array(
    'label',
  ));
  $enabled = ArrayHelper::extractNestedValuesToArray($tweaks, array(
    'enabled',
  ));
  $enabled = drupal_map_assoc(array_keys(array_filter($enabled)));
  $form['helper_tweaks'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Enabled tweaks'),
    '#options' => $options,
    '#default_value' => $enabled,
  );
  $form['#submit'][] = 'helper_settings_form_submit';
  return system_settings_form($form);
}