Source for file INFA_CMS_MENU_NODE.phpclass

Documentation is available at INFA_CMS_MENU_NODE.phpclass

  1. <?php
  2. /**
  3.   * openCSP interface file INFA_CMS_MENU_NODE.phpclass
  4.   *
  5.   * @project Open CSP-Management
  6.   * @package cms
  7.   *
  8.   * @author Peter Krebs <pitlinz@users.sourceforge.net>
  9.   * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  10.   *
  11.   * @since pk-13.06.2008
  12.   * @version $Id: INFA_CMS_MENU_NODE.phpclass,v 1.12 2008/12/03 09:47:56 pitlinz Exp $
  13.   */
  14.  
  15. // ---------------------------------------------------------
  16. // requirements
  17. // ---------------------------------------------------------
  18.  
  19. pcf_require_interface('INFA_DBMS_TABLEOBJ',__OCSP_PHPINCPATH__ "db/INFA_DBMS_TABLEOBJ.phpclass");
  20.  
  21. /**
  22.   * openCSP interface INFA_CMS_MENU_NODE
  23.   *
  24.   * @project Open CSP-Management
  25.   * @package cms
  26.   *
  27.   * @author Peter Krebs <pitlinz@users.sourceforge.net>
  28.   * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  29.   *
  30.   * @since pk-13.06.2008
  31.   * @version $Id: INFA_CMS_MENU_NODE.phpclass,v 1.12 2008/12/03 09:47:56 pitlinz Exp $
  32.   */
  33. {
  34.     // ---------------------------------------------------------------------------
  35.     // constants
  36.     // ---------------------------------------------------------------------------
  37.     
  38.     // ---------------------------------------------------------------------------
  39.     // class (static)
  40.     // ---------------------------------------------------------------------------
  41.     
  42.     /*** class vars ------------------------------------------------------ */
  43.     
  44.     /*** class methods --------------------------------------------------- */
  45.     
  46.     // ---------------------------------------------------------------------------
  47.     // object vars
  48.     // ---------------------------------------------------------------------------
  49.     
  50.     /*** compostion --------------------------------------------------- */
  51.     
  52.     /*** attributes  -------------------------------------------------- */
  53.         
  54.     // ---------------------------------------------------------------------------
  55.     // factory / construct
  56.     // ---------------------------------------------------------------------------
  57.     
  58.     // ---------------------------------------------------------------------------
  59.     // getter / setter
  60.     // ---------------------------------------------------------------------------
  61.         
  62.     /**
  63.      * returns the menu key
  64.      * 
  65.      * the menu key is a '-' seperated string
  66.      * where the 1st part is the ocsp MEN_ID
  67.      * 
  68.      * @return string 
  69.      */
  70.     public function getKey();
  71.     
  72.     /**
  73.      * returns the menu id
  74.      *
  75.      * @return int 
  76.      */
  77.     public function getId();
  78.     
  79.     /**
  80.      * @param int $langId 
  81.      * @param boolean $debug 
  82.      *
  83.      * @return string 
  84.      *
  85.      */
  86.     public function getTitle($langId=0,$debug=False);    
  87.     
  88.     /**
  89.       * returns the orderNr
  90.       *
  91.       * @return int 
  92.       *
  93.       ***/
  94.     public function getOrderNr();
  95.     
  96.     /**
  97.       * sets the OrderNr
  98.       *
  99.       * @param int $aOrderNr 
  100.       *
  101.       ***/
  102.     public function setOrderNr($aOrderNr);    
  103.     
  104.     // ---------------------------------------------------------------------------
  105.     // navigation / output methods
  106.     // ---------------------------------------------------------------------------
  107.  
  108.     /**
  109.       * returns the link url
  110.       *
  111.       * @param array $valArr 
  112.       * @param boolean $debug 
  113.       *
  114.       * @return string 
  115.       *
  116.       */
  117.     public function getLinkUrl($valArr=array(),$debug=False);
  118.     
  119.     // ---------------------------------------------------------------------------
  120.     // tree methods
  121.     // ---------------------------------------------------------------------------
  122.         
  123.     /**
  124.       * returns myTree object
  125.       *
  126.       * @param boolean $useCache 
  127.       * @param boolean $debug 
  128.       * @param boolean $checkParent (if false $this->getParentObj is not called)
  129.       *
  130.       * @return CMS_MENU 
  131.       *
  132.       */
  133.     function &getTree($useCache=True,$debug=False,$checkParent=True);    
  134.     
  135.     /**
  136.       * sets the tree object
  137.       *
  138.       * @param CMS_MENU $aTree 
  139.       *
  140.       */
  141.     function setTreeObj(&$aTree);    
  142.     
  143.      /**
  144.       * returns the parent object or null if parent is root
  145.       *
  146.       * @param boolean $useCache 
  147.       * @param boolean $debug 
  148.       *
  149.       * @return CMS_MENU_NODE 
  150.       *
  151.       */
  152.     function &getParentObj($useCache=True,$debug=False)
  153.         
  154.     /**
  155.      * sets the parent object
  156.      * @param CMS_MENU_NODE $aParent 
  157.      */
  158.     function setParentObj(&$aParent);
  159.     
  160.     /**
  161.       * returns a array back to the root
  162.       *
  163.       * @param boolean $useCache 
  164.       * @param boolean $debug 
  165.       *
  166.       * @return array 
  167.       */
  168.     function getRootPath($useCache=True,$debug=False);    
  169.     
  170.     // ---------------------------------------------------------------------------
  171.     // child nodes 
  172.     // ---------------------------------------------------------------------------    
  173.     
  174.     /**
  175.       * returns if the node has children
  176.       *
  177.       * @param boolean $debug 
  178.       *
  179.       * @return boolean 
  180.       */    
  181.     public function hasChildren($debug=False);    
  182.     
  183.     /**
  184.       * returns a array of pointers to the child objects
  185.       *
  186.       * if filtered $this->myFilterArr is used to check the child
  187.       *
  188.       * @param boolean $useCache 
  189.       * @param boolean $debug 
  190.       * @param boolean $filtered 
  191.       *
  192.       * @global array $OCSP_VAL 
  193.       *
  194.       * @return array 
  195.       *
  196.       */
  197.     function getChildrenList($useCache=True,$debug=False,$filtered=False)
  198.     
  199.     
  200.     // ---------------------------------------------------------------------------
  201.     // cms project methods
  202.     // ---------------------------------------------------------------------------
  203.       
  204.     /**
  205.       * returns the Project Object
  206.       *
  207.       * @param boolean $debug 
  208.       * @param boolean $forceObj (if false no new object will be instanciated)
  209.       * @param boolean $setAsCurrent (if true call $this->setAsCurrent())
  210.       *
  211.       * @return CMS_PROJECT 
  212.       *
  213.       */
  214.     function &getMyProject($debug=False,$forceObj=True,$setAsCurrent=False);     
  215.  
  216.     // ---------------------------------------------------------------------------
  217.     // cms menu methods
  218.     // ---------------------------------------------------------------------------
  219.     
  220.     /**
  221.       * checks if the menu is to show from date
  222.       *
  223.       * return values are:
  224.       *
  225.       * - 1: yes
  226.       * - 0: showtill is outdate
  227.       * - -2: showfrom is not reached
  228.       *
  229.       * @return int 
  230.       *
  231.       */
  232.     function checkShowDate($debug=False);
  233.     
  234.     /**
  235.       * checks if the node is on
  236.       *
  237.       * @param boolean $checkDate 
  238.       * @param boolean $checkGroup 
  239.       * @param boolean $debug 
  240.       * @param boolean $checkShow 
  241.       *
  242.       * @return bool 
  243.       */
  244.     function isToShow($checkDate=True,$checkGroup=True,$debug=False,$checkShow=True);
  245.         
  246.     /**
  247.       * returns if the object is to echo in the tree when creating the html-code
  248.       * or only children are to show instead of the node
  249.       *
  250.       * @param boolean $debug 
  251.       *
  252.       * @return boolean 
  253.       *
  254.       */
  255.     function isToEcho($debug=False);    
  256.     
  257.     /**
  258.       * checks if the menu is the current menu
  259.       *
  260.       * @param boolean $debug 
  261.       *
  262.       * @return boolean 
  263.       *
  264.       */
  265.     function isCurrent($debug=False);    
  266.     
  267.     /**
  268.       * sets the node as current menu node
  269.       * @param boolean $debug 
  270.       */
  271.     function setAsCurrent($debug=False);
  272.     
  273.     /**
  274.      * returns if the node is editable
  275.      *
  276.      * @param boolean $debug 
  277.      * @return boolean 
  278.      */
  279.     public function isEditable($debug=False);    
  280.     
  281.     /**
  282.      * return if the menu type can have editable pages
  283.      * 
  284.      * if not the menu generates it's page object himself
  285.      * users are not able to add pages to the menu
  286.      *
  287.      * @param boolean $debug 
  288.      * 
  289.      * @return boolean 
  290.      * 
  291.      * @since pk-08-12-03
  292.      */
  293.     public function hasEditablePages($debug=False);    
  294.     
  295.     // ---------------------------------------------------------------------------
  296.     // cms page methods
  297.     // ---------------------------------------------------------------------------
  298.     
  299.     /**
  300.       * returns the current Page
  301.       * this is the first page found and the user has rights to show
  302.       *
  303.       * @param boolean $goDown (check children if the node has no page to show)
  304.       * @param boolean $online (check if the page is online if false all pages are returned)
  305.       * @param array $xtraConditions (array of columns to check to)
  306.       * @param boolean $debug 
  307.       *
  308.       * @return CMS_PAGE 
  309.       *
  310.       */
  311.     function &getCurrentPage($goDown=False,$online=True,$xtraConditions=Null,$debug=False);
  312.     
  313.     /**
  314.      * returns the template id set in menu or project
  315.      *
  316.      * @param boolean $debug 
  317.      * 
  318.      * @return int 
  319.      * 
  320.      * @since pk-08-06-16
  321.      */
  322.     public function getTemplateId($debug=False);    
  323.     
  324.     // ---------------------------------------------------------------------------
  325.     // user / rights
  326.     // ---------------------------------------------------------------------------
  327.     
  328.     /**
  329.       * returns if the current user can open the menu
  330.       *
  331.       * @param boolean $debug 
  332.       *
  333.       * @return boolean 
  334.       *
  335.       */
  336.     function curUserCanOpen($debug=False);
  337.     
  338.     /**
  339.       * returns if the current user can add a childmenu
  340.       *
  341.       * @param boolean $debug 
  342.       *
  343.       * @return boolean 
  344.       *
  345.       */
  346.     function curUserCanAddChild($debug=False);    
  347.     
  348.     /**
  349.       * returns if the current user can add a page
  350.       *
  351.       * @param boolean $debug 
  352.       *
  353.       * @return boolean 
  354.       *
  355.       */
  356.     function curUserCanAddPage($debug=False);  
  357.  
  358.     /**
  359.       * returns if the current user can delete the menu
  360.       *
  361.       * @param boolean $debug 
  362.       *
  363.       * @return boolean 
  364.       *
  365.       */
  366.     function curUserCanDelete($debug=False);
  367.  
  368.     /**
  369.       * returns if the current user can edit the menu
  370.       *
  371.       * @param boolean $debug 
  372.       *
  373.       * @return boolean 
  374.       *
  375.       * @since pk-06-11-06
  376.       *
  377.       ***/
  378.     function curUserCanEdit($debug=False);  
  379.  
  380. }
  381.  
  382. ?>

Documentation generated on Thu, 08 Jan 2009 17:44:25 +0100 by phpDocumentor 1.4.0a2