You are here

function menu_block_view in Drupal 7

Implements hook_block_view().

File

modules/menu/menu.module, line 508
Allows administrators to customize the site's navigation menus.

Code

function menu_block_view($delta = '') {
  $menus = menu_get_menus(FALSE);
  $data['subject'] = check_plain($menus[$delta]);
  $data['content'] = menu_tree($delta);

  // Add contextual links for this block.
  if (!empty($data['content'])) {
    $data['content']['#contextual_links']['menu'] = array(
      'admin/structure/menu/manage',
      array(
        $delta,
      ),
    );
  }
  return $data;
}