<?php

/**
* Parent class for menu hooks (to generate the menu dropdowns at the top of the screen)
*
* @package Newedge_API
* @abstract
*/
class NE_MenuHook
{
    /**
    * Configuration array
    *
    * @access protected
    * @see NE_Model::configuration
    * @var array
    */
    var $configuration;

    /**
    * Settings object.
    *
    * @access protected
    * @var Settings
    */
    var $settings;

    /**
    * The action or view's class name
    *
    * @access protected
    * @var string
    */
    var $action;

    /**
    * The user object
    *
    * @access protected
    * @var User
    */
    var $user;

    /**
    * The customer object, or false if logged-in user is an admin that hasn't selected a customer.
    *
    * @access protected
    * @var User
    */
    var $customer;

    var $modulesViews = array();

    /**
    * This is "package private" rather.
    *
    * @access private
    */
    function NE_MenuHook($action, &$user, &$customer)
    {
        $this->action = $action;
        $this->user =& $user;
        $this->customer =& $customer;
        $this->settings =& NE_Registry::getSettings();
        $this->configuration = NE_Registry::getConfiguration();
    }

    /**
    * Returns an array describing the Menu Items and tabs for this module. You must override this method.
    *
    * @abstract
    * @return array Each array item is a subarray of the form:<br>
    *               Array(  'navlinks'  => array of links composing the location label (to of the screen, next to the arrow, below the menus)
    *                       'menus'     => 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() {}

    function getModulesViews()
    {
        return $this->modulesViews;
    }

    function addModulesViews($modulesViews)
    {
        $this->modulesViews[] = $modulesViews;
    }
}

?>
