1 block.menus.inc DashboardMenuBlock::form(&$form, &$form_state)

Build the settings form for editing this block.

Overrides Block::form

File

core/modules/dashboard/includes/block.menus.inc, line 129
Dashboard block displaying menus on the site.

Class

DashboardMenuBlock
@file Dashboard block displaying menus on the site.

Code

function form(&$form, &$form_state) {
  parent::form($form, $form_state);
  if (!module_exists('menu')) {
    return $form;
  }


  $menus = menu_get_menus();
  foreach ($menus as $menu_key => $menu_label) {
    $menus[$menu_key] = check_plain(t($menu_label));
  }

  $form['menus'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Display links for the following menus'),
    '#options' => $menus,
    '#default_value' => $this->settings['menus'],
  );
}