1 system.module system_header_block_form($settings)

Settings form for the header block.

File

core/modules/system/system.module, line 3143
Configuration system that lets administrators modify the workings of the site.

Code

function system_header_block_form($settings) {
  $settings += array(
    'menu' => 'user-menu',
    'logo' => TRUE,
    'site_name' => TRUE,
    'site_slogan' => TRUE,
  );

  $form['menu'] = array(
    '#title' => t('Menu'),
    '#type' => 'select',
    '#options' => menu_get_menus(),
    '#empty_option' => '- ' . t('None') . ' -',
    '#default_value' => $settings['menu'],
  );
  $form['components'] = array(
    '#type' => 'fieldset',
    '#title' => t('Site information'),
    '#description' => t('Show or hide various components of your site header. To change the values of these components, visit the !site_info page.', 
    array('!site_info' => l(t('Site information'), 'admin/config/system/site-information'))),
  );
  $form['components']['logo'] = array(
    '#type' => 'checkbox',
    '#title' => t('Logo'),
    '#default_value' => $settings['logo'],
  );
  $form['components']['site_name'] = array(
    '#type' => 'checkbox',
    '#title' => t('Site name'),
    '#default_value' => $settings['site_name'],
  );
  $form['components']['site_slogan'] = array(
    '#type' => 'checkbox',
    '#title' => t('Site slogan'),
    '#default_value' => $settings['site_slogan'],
  );

  return $form;
}