1 menu.admin.inc menu_settings_form($form, &$form_state)

Menu callback; global settings form for menus.

File

core/modules/menu/menu.admin.inc, line 760
Admin page callbacks for the Menu module.

Code

function menu_settings_form($form, &$form_state) {
  $form['#config'] = 'menu.settings';
  $config = config('menu.settings');

  $form['menu_breakpoint'] = array(
    '#type' => 'radios',
    '#title' => t('Breakpoint'),
    '#description' => t("The 'min-width' for the menu breakpoint. Screens smaller than this may display a menu toggle button, depending on the menu-specific settings."),
    '#options' => array(
      'default' => t('Default (48em)'),
      'custom' => t('Custom'),
    ),
    '#default_value' => $config->get('menu_breakpoint'),
  );
  $form['menu_breakpoint_custom'] = array(
    '#type' => 'textfield',
    '#description' => t("A valid CSS width value (e.g.: '768px', '34em')."),
    '#default_value' => $config->get('menu_breakpoint_custom'),
    '#size' => 8,
    '#field_prefix' => 'min-width:',
    '#states' => array(
      'visible' => array(
        ':input[name="menu_breakpoint"]' => array('value' => 'custom'),
      ),
    ),
  );
  $form['#submit'][] = 'menu_settings_form_submit';

  return system_settings_form($form);
}