You are here

function _panels_page_construct_parent_menu_item in Panels 6.2

Create a parent menu item for a panel page.

2 calls to _panels_page_construct_parent_menu_item()
panels_page_construct_dynamic_menu_link in panels_page/panels_page.menu.inc
panels_page_construct_static_menu_link in panels_page/panels_page.menu.inc
Build a panels_page menu entry for a static panels_page.

File

panels_page/panels_page.menu.inc, line 402
panels_page.menu.inc

Code

function _panels_page_construct_parent_menu_item(&$items, $panel_page, $path, $type) {
  if ($type == MENU_DEFAULT_LOCAL_TASK && dirname($path) && dirname($path) != '.') {

    // FIXME this is currently completely borked - if we end up inside this
    // control statement, everything will break. However, we should also be eliminating
    // the statement later.
    switch ($panel_page->menu_tab_default_parent_type) {
      case 'tab':
        $parent_type = MENU_LOCAL_TASK;
        break;
      case 'normal':
        $parent_type = MENU_NORMAL_ITEM;
        break;
      default:
      case 'existing':
        $parent_type = 0;
        break;
    }
    if ($parent_type) {
      $title = filter_xss_admin(panels_page_get_title($panel_page, 'menu-parent'));
      $weight = $panel_page->menu_parent_tab_weight;

      // FIXME this function doesn't even exist anymore.
      $items[$path] = _panels_page_menu_item($path, $title, $panel_page, $args, $access, $parent_type, $weight);
    }
  }
}