You are here

function book_admin_settings in Drupal 7

Same name and namespace in other branches
  1. 6 modules/book/book.admin.inc \book_admin_settings()

Form constructor for the book settings form.

See also

book_admin_settings_validate()

Related topics

1 string reference to 'book_admin_settings'
book_menu in modules/book/book.module
Implements hook_menu().

File

modules/book/book.admin.inc, line 36
Administration page callbacks for the Book module.

Code

function book_admin_settings() {
  $types = node_type_get_names();
  $form['book_allowed_types'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Content types allowed in book outlines'),
    '#default_value' => variable_get('book_allowed_types', array(
      'book',
    )),
    '#options' => $types,
    '#description' => t('Users with the %outline-perm permission can add all content types.', array(
      '%outline-perm' => t('Administer book outlines'),
    )),
    '#required' => TRUE,
  );
  $form['book_child_type'] = array(
    '#type' => 'radios',
    '#title' => t('Content type for child pages'),
    '#default_value' => variable_get('book_child_type', 'book'),
    '#options' => $types,
    '#required' => TRUE,
  );
  $form['array_filter'] = array(
    '#type' => 'value',
    '#value' => TRUE,
  );
  $form['#validate'][] = 'book_admin_settings_validate';
  return system_settings_form($form);
}