<?php


/**
* @package Skeleton
*/
class Skeleton_menu extends NE_MenuHook
{
    /**
    * Contains an array list of each view handled in this menu.
    *
    * Syntax is array(module, classView)
    *
    * @access public
    */
    var $modulesViews = array(
        array('skeleton', 'View1'),
        array('skeleton', 'View2'),
        array('skeleton', 'View3'),
    );

    /**
    * Returns an array describing the Menu Items and tabs for this module
    *
    * @access public
    * @param boolean $addLocation Currently unused
    * @return array Each array item is a subarray of the form:<br>
    *               Array(  0 => label (optionally wrapped in a link tag),
    *                       1 => 0 for a menu item or 1 for a tab item,
    *                       2 => 0 for an unselected tab item or 1 for a selected tab item)
    */
    function getMenuArr($addLocation = false)
    {
        $menuArr = array();
        $navlinks = array();

        if ($this->action == 'View1') {
            $selectedTab = 1;
            $linkClass = 'sel';
            $navlinks[] = 'View 1';
        } else {
            $selectedTab = 0;
            $linkClass = '';
        }
        $menuArr[0][0] = "<a href=\"index.php?fuse=skeleton&amp;view=View1\" $linkClass >View 1</a>";
        $menuArr[0][1] = 0;
        $menuArr[1][0] = '<a href="index.php?fuse=skeleton&amp;view=View1">View 1 tab</a>';
        $menuArr[1][1] = 1;
        $menuArr[1][2] = $selectedTab;

        if ($this->action == 'View2') {
            $selectedTab = 1;
            $linkClass = 'sel';
            $navlinks[] = 'View 2';
        } else {
            $selectedTab = 0;
            $linkClass = '';
        }
        $menuArr[2][0] = "<a href=\"index.php?fuse=skeleton&amp;view=View2\" $linkClass >View 2</a>";
        $menuArr[2][1] = 0;
        $menuArr[3][0] = '<a href="index.php?fuse=skeleton&amp;view=View2">View 2 tab</a>';
        $menuArr[3][1] = 1;
        $menuArr[3][2] = $selectedTab;

        if ($this->action == 'View3') {
            $selectedTab = 1;
            $linkClass = 'sel';
            $navlinks[] = 'View 3';
        } else {
            $selectedTab = 0;
            $linkClass = '';
        }
        $menuArr[4][0] = "<a href=\"index.php?fuse=skeleton&amp;view=View3\" $linkClass >View 3</a>";
        $menuArr[4][1] = 0;
        $menuArr[5][0] = '<a href="index.php?fuse=skeleton&amp;view=View3">View 3 tab</a>';
        $menuArr[5][1] = 1;
        $menuArr[5][2] = $selectedTab;

        return array('navlinks' => $navlinks, 'menus' => $menuArr);
    }

}

?>
