You are here

function content_type_overview_settings_form in Content type overview 6

Same name and namespace in other branches
  1. 7 content_type_overview.module \content_type_overview_settings_form()

Menu callback; admin settings form.

1 string reference to 'content_type_overview_settings_form'
content_type_overview_menu in ./content_type_overview.module
Implementation of hook_menu().

File

./content_type_overview.module, line 221
Provides easy access to all basic content type settings.

Code

function content_type_overview_settings_form() {
  $form = array();
  $options = array();
  foreach (node_get_types('types', NULL, TRUE) as $name => $type) {
    $options[$name] = $type->name;
  }
  $form['content_type_overview_types'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Content types'),
    '#description' => t('Select the content types you want to include on the overview page.'),
    '#options' => $options,
    '#default_value' => variable_get('content_type_overview_types', array()),
  );
  $form['content_type_overview_shorten_labels'] = array(
    '#type' => 'checkbox',
    '#title' => t('Shorten form labels'),
    '#description' => t('Enable this to shorten the form element labels. This makes it possible to display more widgets per screen.'),
    '#default_value' => variable_get('content_type_overview_shorten_labels', TRUE),
  );
  return system_settings_form($form);
}