function menu_overview_page

Menu callback which shows an overview page of all the custom menus and their descriptions.

1 string reference to 'menu_overview_page'
menu_menu in drupal/core/modules/menu/menu.module
Implements hook_menu().

File

drupal/core/modules/menu/menu.admin.inc, line 13
Administrative page callbacks for menu module.

Code

function menu_overview_page() {
  $result = db_query("SELECT * FROM {menu_custom} ORDER BY title", array(), array(
    'fetch' => PDO::FETCH_ASSOC,
  ));
  $header = array(
    t('Title'),
    t('Operations'),
  );
  $rows = array();
  foreach ($result as $menu) {
    $row = array();
    $row[] = theme('menu_admin_overview', array(
      'title' => $menu['title'],
      'name' => $menu['menu_name'],
      'description' => $menu['description'],
    ));
    $links = array();
    $links['list'] = array(
      'title' => t('list links'),
      'href' => 'admin/structure/menu/manage/' . $menu['menu_name'],
    );
    $links['edit'] = array(
      'title' => t('edit menu'),
      'href' => 'admin/structure/menu/manage/' . $menu['menu_name'] . '/edit',
    );
    $links['add'] = array(
      'title' => t('add link'),
      'href' => 'admin/structure/menu/manage/' . $menu['menu_name'] . '/add',
    );
    $row[] = array(
      'data' => array(
        '#type' => 'operations',
        '#links' => $links,
      ),
    );
    $rows[] = $row;
  }
  return theme('table', array(
    'header' => $header,
    'rows' => $rows,
  ));
}