Class CMS_MENU_NODE

Description

Implements interfaces:

Class CMS_MENU_NODE

Located in /cms/menu/CMS_MENU_NODE.phpclass (line 39)

OCSP_OBJ
   |
   --DBMS_TABLEOBJ
      |
      --DBMS_TREE_NODE
         |
         --CMS_MENU_NODE
Direct descendents
Class Description
 class PGP_CMS_MENU openCSP class PGP_CMS_MENU
Class Constant Summary
 CLASS_SRC_FILE = __FILE__
Variable Summary
Method Summary
 static CMS_MENU_NODE &factoryFromKey (int $projId, string $key, [boolean $debug = False])
 static void &getInstance ( $aKey, [ $projId = 0])
 CMS_MENU_NODE CMS_MENU_NODE ([int $aId = Null], [mixed $myTree = ""], [boolean $auto_populate = True], [boolean $debug = False])
 int addChildNode ( &$aNode, [boolean $debug = FALSE], DBMS_TREE_NODE $aNode)
 boolean areChildrenToIntend ([boolean $debug = False])
 int checkShowDate ([ $debug = False])
 void copyChildsFrom (mixed &$source, [boll $copypage = TRUE], [bool $outdated = FALSE], [bool $debug = FALSE])
 void copyPagesFrom ( &$source, [bool $outdated = FALSE], [bool $debug = FALSE], mixed $source, boll $copypage)
 boolean curUserCanAddChild ([boolean $debug = False])
 boolean curUserCanAddPage ([boolean $debug = false])
 boolean curUserCanDelete ([boolean $debug = False])
 boolean curUserCanEdit ([boolean $debug = False])
 void curUserCanFormMode ( $aMode, [ $debug = False])
 boolean curUserCanOpen ([boolean $debug = FALSE])
 boolean dbDelete ([boolean $backupData = FALSE], [boolean $debug = FALSE], string $gDBIDX)
 DBMS_FORM &dbGetForm ([int $mode = FRM_MODE_READONLY], [string $frmName = ""], [ $debug = FALSE])
 int dbInsert ([boolean $debug = False])
 int dbReplace ([boolean $debug = False], [boolean $ignorPopulated = False])
 array getChildrenList ([boolean $useCache = True], [boolean $debug = False], [boolean $filtered = False])
 string getChildTblName ()
 string getCrossProjLinkUrl ( $aProjId,  $debug, int $projId)
 CMS_PAGE &getCurrentPage ([boolean $goDown = False], [boolean $online = True], [array $xtraConditions = Null], [boolean $debug = False])
 array getDefaults ([boolean $debug = FALSE])
 CMS_MENU_NODE &getFirstChild ([boolean $isOnline = TRUE], [boolean $useCache = TRUE], [boolean $debug = FALSE])
 OCSP_FORM &getForm ([int $mode = FRM_MODE_READONLY], [mixed $form = Null], [string $frmClass = 'CMS_MENU_FORM'], [boolean $debug = False])
 string getFormClassName ()
 string getFormName ()
 string getHTMLLink ([array $valArr = NULL], [string $aAddTag = ""], [boolean $debug = FALSE], [ $add_GETarr = NULL], boolean $addGetArr)
 int getId ()
 string getKey ()
 int getLangId ()
 string getLinkUrl ([array $valArr = array()], [boolean $debug = False])
 int getMenId ()
 void getMenuInclude ()
 CMS_MENU_NODE &getMyCMSMenuNode ([boolean $debug = FALSE])
 void &getMyProject ([ $debug = False], [ $forceObj = True], [ $setAsCurrent = False])
 CMS_MENU_NODE &getNextSibling ([ $goDown = TRUE], [boolean $isOnline = TRUE], [boolean $useCache = TRUE], [boolean $debug = FALSE], boolean $goUp)
 array getObjVarDef ([ $debug = False])
 array getPageArray ([boolean $showAll = FALSE], [string $whereAdd = ""], [boolean $debug = FALSE], [string $orderBy = ""])
 int getPageId ([boolean $goDown = FALSE], [boolean $showAll = FALSE], [string $whereAdd = ""], [boolean $debug = FALSE])
 array getPageKeyArr ([boolean $online = TRUE], [array $xtraConditions = NULL], [boolean $debug = FALSE])
 array getPageList ([boolean $useCache = True], [boolean $online = True], [boolean $debug = False])
 int getPageTmplateId ([boolean $debug = False])
 string getPageWhere ([boolean $showAll = FALSE], [string $whereAdd = ""], [boolean $debug = FALSE])
 CMS_MENU_NODE &getParentObj ([boolean $useCache = True], [boolean $debug = False])
 CMS_MENU_NODE &getPrevSibling ([boolean $goUp = TRUE], [boolean $isOnline = TRUE], [boolean $useCache = TRUE], [boolean $debug = FALSE])
 string getProjCrossLink_A ([int $projId = 0], [ $addTag = ""], [ $debug = FALSE])
 int getProjId ()
 array getRootPath ([boolean $useCache = True], [boolean $debug = False])
 int getShowGroup ()
 string getSideMenuLink ([string $class = ""], [boolean $debug = FALSE])
 int getTemplateId ([boolean $debug = False])
 string getTitle ([int $langId = 0], [boolean $debug = False])
 string getTitleAsDirName ()
 CMS_MENU &getTree ([boolean $useCache = True], [boolean $debug = False], [boolean $checkParent = True])
 bool hasChildrenToShow ([boolean $filtered = FALSE], [boolean $checkDate = TRUE], [boolean $checkGroup = TRUE], [boolean $debug = FALSE], [ $checkShow = TRUE])
 boolean hasEditablePages ([boolean $debug = False])
 boolean isCurrent ([boolean $debug = False])
 boolean isDeleteable ([boolean $debug = False])
 boolean isEditable ([boolean $debug = False])
 boolean isEnabled ()
 boolean isInPath ([array $rPath = NULL], [boolean $debug = FALSE])
 boolean isToEcho ([boolean $debug = False])
 bool isToShow ([boolean $checkDate = True], [boolean $checkGroup = True], [boolean $debug = False], [ $checkShow = True])
 object newChildObj (array $dbRow, [boolean $debug = False])
 double populateChildren ([boolean $useCache = True], [boolean $debug = False])
 array populatePages ([boolean $debug = False])
 void setAsCurrent ([boolean $debug = FALSE])
 void setDBVal (array $valArr, [boolean $debug = FALSE])
 void setDisabled ()
 void setEnabled ()
 void setMyProject ( &$aProjObj, [boolean $debug = FALSE], CMS_PROJECT $aProjObj)
 void setParentObj ( &$aParent, CMS_MENU_NODE $aParent)
 void setProjId (int $aId)
 void setTitle (string $aTitle)
 CMS_MENU_NODE validateClass ([ $debug = False], boolean $debug;)
 CMS_MENU_NODE validateCurrentMenu ([ $debug = FALSE], boolean $debug;)
 void writeSideMenuRow ([string $class = ""], boolean $debug)
 void writeSideMenuRowOnPath ( $treePath, [string $class = ""], [boolean $debug = FALSE])
Variables
static mixed $menuProjectLst = array() (line 63)

array with key -> project association

  • staticvar: array $menuProjectLst:
  • access: protected
mixed $CLASSVARIABLES = "MEN_OBJCLASS,myTreeClass,myIdFld,myParentFld,mySortFld,myTable,myChildKeys,myChildClass,myPageTable,myPageTable" (line 213)
  • staticvar: string $CLASSVARIABLES:
  • since: pk-05-11-22
  • access: protected
double $hasChildrenToShowTS (line 195)
  • since: pk-05-07-27
  • access: protected
string $HTML_TitleAppend = "" (line 207)
  • since: pk-05-08-08
  • access: protected
string $HTML_TitlePrepend = "" (line 201)
  • since: pk-05-08-08
  • access: protected
string $myChildClass = "CMS_MENU_NODE" (line 177)
  • access: protected

Redefinition of:
DBMS_TREE_NODE::$myChildClass
mixed $myChildKeys = "PROJ_ID" (line 172)
  • staticvar: strint $myChildKeys: comma sperated list of keys the children have to fit to
  • access: protected

Redefinition of:
DBMS_TREE_NODE::$myChildKeys
string $myChildTbl = "T_CMS_MENU" (line 183)
  • var: table where childrens are stored
  • since: pk-05-12-12
  • access: protected
mixed $myClassSrcFile = __FILE__ (line 109)
  • staticvar: string $myClassSrcFile: if is set the DBMS_FORM get the class object
  • since: pk-07-10-14
  • access: protected

Redefinition of:
DBMS_TREE_NODE::$myClassSrcFile
CMS_PAGE $myCurrentPage = Null (line 131)

the current page

  • access: protected
mixed $myIdFld = "MEN_ID" (line 157)
  • staticvar: string $myIdFld: id column = root
  • access: protected

Redefinition of:
DBMS_TREE_NODE::$myIdFld
array $myOnlinePageList = array('NOTLOADED'=>TRUE) (line 227)
  • since: pk-07-08-16
  • access: protected
array $myPages = array() (line 138)

array of the menu pages

  • access: protected
mixed $myPageTable = "T_CMS_PAGE" (line 189)
  • staticvar: string $myPageTable:
  • since: pk-05-07-12
  • access: protected
mixed $myParentFld = "MEN_PARENT" (line 162)
  • staticvar: string $myParentFld: name of the parent column
  • access: protected

Redefinition of:
DBMS_TREE_NODE::$myParentFld
CMS_PROJECT $myProjObj = NULL (line 124)
  • since: pk-05-07-11
  • access: protected
mixed $mySortFld = "MEN_SORTORDER" (line 167)
  • staticvar: string $mySortFld: name of the sort field
  • access: protected

Redefinition of:
DBMS_TREE_NODE::$mySortFld
string $myTable = "T_CMS_MENU" (line 147)
  • access: protected

Redefinition of:
DBMS_TABLEOBJ::$myTable
NOT FINAL !!!!!
int $myTemplateId = 0 (line 220)

Id of the template to use if PTMP_ID is not used

  • since: pk-08-06-16
  • access: protected
mixed $myTreeClass = "CMS_MENU" (line 152)
  • staticvar: string $myTreeClass:
  • access: protected

Redefinition of:
DBMS_TREE_NODE::$myTreeClass
double $pageListPopulateTS = 0 (line 234)

timestamp the page list has been populated

  • access: protected

Inherited Variables

Inherited from DBMS_TREE_NODE

DBMS_TREE_NODE::$changesParent
DBMS_TREE_NODE::$level
DBMS_TREE_NODE::$myChildCacheTTL
DBMS_TREE_NODE::$myChildren
DBMS_TREE_NODE::$myChildrenPopulateTS
DBMS_TREE_NODE::$myFilterArr
DBMS_TREE_NODE::$myLink
DBMS_TREE_NODE::$myParent
DBMS_TREE_NODE::$myTree
DBMS_TREE_NODE::$orderNr

Inherited from DBMS_TABLEOBJ

DBMS_TABLEOBJ::$autoIncFld
DBMS_TABLEOBJ::$dbTableDefinitions
DBMS_TABLEOBJ::$frmPostSubOjects
DBMS_TABLEOBJ::$hasObjVals
DBMS_TABLEOBJ::$initTS
DBMS_TABLEOBJ::$myCacheTS
DBMS_TABLEOBJ::$myFields
DBMS_TABLEOBJ::$myKeys
DBMS_TABLEOBJ::$myLinkedTableRows
DBMS_TABLEOBJ::$myMode
DBMS_TABLEOBJ::$myObjVals
DBMS_TABLEOBJ::$myObjValsPopulateTS
DBMS_TABLEOBJ::$objError
DBMS_TABLEOBJ::$objErrorMsg
DBMS_TABLEOBJ::$populateTS
DBMS_TABLEOBJ::$staticClassVars
DBMS_TABLEOBJ::$valChangeTS

Inherited from OCSP_OBJ

OCSP_OBJ::$global_currentUser
OCSP_OBJ::$global_defaultDBObj_read
OCSP_OBJ::$global_defaultDBObj_write
OCSP_OBJ::$myDBObj
Methods
static factoryFromKey (line 299)

fakotry the propper menu node from the key

the key can be seperated with a _ in this case the first element is the MEN_ID and the second one is passed to the new node

  • access: public
CMS_MENU_NODE &factoryFromKey (int $projId, string $key, [boolean $debug = False])
  • int $projId
  • string $key
  • boolean $debug
static getInstance (line 67)

* class methods ----------------------------------------------

  • access: public
void &getInstance ( $aKey, [ $projId = 0])
  • $aKey
  • $projId
Constructor CMS_MENU_NODE (line 269)

cunstructor checks if we have a key of $this->mytable or a composed one and populates the menu node from T_CMS_MENU if $auto_populate is true

composed keys consists of at least 2 parts seperated by "-"

1st Part: MEN_ID 2nd Part: modulekey ....

example 1_PGP_1_1

  • version: pk-07-06-15
  • version: pk-08-06-19
  • deprecated: since pk-08-06-19
  • since: pk-05-12-14
CMS_MENU_NODE CMS_MENU_NODE ([int $aId = Null], [mixed $myTree = ""], [boolean $auto_populate = True], [boolean $debug = False])
  • int $aId
  • mixed $myTree: @see DBMS_TREE_NODE::DBMS_TREE_NODE()
  • boolean $auto_populate
  • boolean $debug
addChildNode (line 1268)

adds a node to childArray($key)

int addChildNode ( &$aNode, [boolean $debug = FALSE], DBMS_TREE_NODE $aNode)
  • DBMS_TREE_NODE $aNode
  • boolean $debug
  • &$aNode

Redefinition of:
DBMS_TREE_NODE::addChildNode()
adds a node to childArray($key)
areChildrenToIntend (line 1530)

PROTOTYPE:

returns if html-code should add an intend statement before children(list) is outputed

  • return: (TRUE)
  • since: pk-06-05-30
boolean areChildrenToIntend ([boolean $debug = False])
  • boolean $debug
checkShowDate (line 1583)

checks if the menu is to show from date

return values are:

  • 1: yes
  • 0: showtill is outdate
  • -2: showfrom is not reached

  • version: pk-08-08-01
  • since: pk-04-07-23
int checkShowDate ([ $debug = False])
  • $debug

Implementation of:
INFA_CMS_MENU_NODE::checkShowDate()
checks if the menu is to show from date
copyChildsFrom (line 1294)

copies the childs from the menu with id $sourceId into this menu

  • version: pk-07-10-01
  • since: sw-05-12-30
void copyChildsFrom (mixed &$source, [boll $copypage = TRUE], [bool $outdated = FALSE], [bool $debug = FALSE])
  • mixed &$source: MEN_ID or menu object of sourcemenu
  • boll $copypage: if true pages will be copied, else only menu sructure
  • bool $outdated: if true copy only pages with show till > now
  • bool $debug
copyPagesFrom (line 1358)

copies the pages from the menu with id $sourceId into this menu

  • version: pk-07-10-01
  • since: sw-05-12-30
void copyPagesFrom ( &$source, [bool $outdated = FALSE], [bool $debug = FALSE], mixed $source, boll $copypage)
  • mixed $source: MEN_ID of sourcemenu or menu object
  • boll $copypage: if true pages will be copied, else only menu sructure
  • bool $outdated: if true copy only pages with show till > now
  • bool $debug
  • &$source
curUserCanAddChild (line 1911)

returns if the current user can add a childmenu

  • since: pk-05-12-14
  • access: public
boolean curUserCanAddChild ([boolean $debug = False])
  • boolean $debug

Implementation of:
INFA_CMS_MENU_NODE::curUserCanAddChild()
returns if the current user can add a childmenu
curUserCanAddPage (line 1928)

returns if the current user can add a page

  • since: pk-05-12-14
  • access: public
boolean curUserCanAddPage ([boolean $debug = false])
  • boolean $debug

Implementation of:
INFA_CMS_MENU_NODE::curUserCanAddPage()
returns if the current user can add a page
curUserCanDelete (line 1945)

returns if the current user can delete the menu

  • since: pk-05-12-14
  • access: public
boolean curUserCanDelete ([boolean $debug = False])
  • boolean $debug

Implementation of:
INFA_CMS_MENU_NODE::curUserCanDelete()
returns if the current user can delete the menu
curUserCanEdit (line 1972)

returns if the current user can edit the menu

  • since: pk-06-11-06
  • access: public
boolean curUserCanEdit ([boolean $debug = False])
  • boolean $debug

Implementation of:
INFA_CMS_MENU_NODE::curUserCanEdit()
returns if the current user can edit the menu
curUserCanFormMode (line 1979)
  • access: public
void curUserCanFormMode ( $aMode, [ $debug = False])
  • $aMode
  • $debug
curUserCanOpen (line 1882)

returns if the current user can open the menu

  • version: pk-06-11-15 return $this->curUserCanEdit($debug) instead of FALSE
  • since: pk-06-11-11
  • access: public
boolean curUserCanOpen ([boolean $debug = FALSE])
  • boolean $debug

Implementation of:
INFA_CMS_MENU_NODE::curUserCanOpen()
returns if the current user can open the menu
dbDelete (line 1235)

deletes a node from the database

  • todo: CMS_MENU_NODE::dbDelete() inline SQL
  • since: pk-05-11-29
boolean dbDelete ([boolean $backupData = FALSE], [boolean $debug = FALSE], string $gDBIDX)
  • string $gDBIDX
  • boolean $backupData
  • boolean $debug

Redefinition of:
DBMS_TABLEOBJ::dbDelete()
dbGetForm (line 877)

returns a database form

  • version: pk-05-02-17 add objects if TYPE == "__FRMFIELD__"
  • version: pk-05-01-12 store the page object to the database
  • deprecated: since pk-07-08-21
DBMS_FORM &dbGetForm ([int $mode = FRM_MODE_READONLY], [string $frmName = ""], [ $debug = FALSE])
  • int $mode: dbms form show mode
  • string $frmName: dbms form name
  • $debug

Redefinition of:
DBMS_TABLEOBJ::dbGetForm()
returns a database form
dbInsert (line 1179)

ensures that LANG_ID is set and sets $this->mySortFld to IFNULL(MAX(".$this->mySortFld."),1)

  • return: returns the autoIncFld ID if exists or 1 on success
  • version: pk-05-07-08
  • since: pk-04-08-25
int dbInsert ([boolean $debug = False])
  • boolean $debug: show debug info

Redefinition of:
DBMS_TABLEOBJ::dbInsert()
inserts a new row to the table
dbReplace (line 1207)

ensures that LANG_ID is set

  • return: returns the autoIncFld ID if exists or 1 on success
  • since: pk-06-08-18
int dbReplace ([boolean $debug = False], [boolean $ignorPopulated = False])
  • boolean $debug: show debug info
  • boolean $ignorPopulated: (if false the table MUST have been populated)

Redefinition of:
DBMS_TABLEOBJ::dbReplace()
replaces a row in the table
getChildrenList (line 643)

returns a array of pointers to the child objects

if filtered $this->myFilterArr is used to check the child

array getChildrenList ([boolean $useCache = True], [boolean $debug = False], [boolean $filtered = False])
  • boolean $useCache
  • boolean $debug
  • boolean $filtered

Redefinition of:
DBMS_TREE_NODE::getChildrenList()

Implementation of:
INFA_CMS_MENU_NODE::getChildrenList()
returns a array of pointers to the child objects
getChildTblName (line 441)
string getChildTblName ()

Redefinition of:
DBMS_TREE_NODE::getChildTblName()
getCrossProjLinkUrl (line 2398)

returns the link url to other projekts coresponding page

string getCrossProjLinkUrl ( $aProjId,  $debug, int $projId)
  • int $projId
  • $aProjId
  • $debug
getCurrentPage (line 2771)

returns the current Page this is the first page found and the user has rights to show

  • version: pk-08-02-16 return pointer (&)
  • version: pk-08-07-16
  • since: pk-07-08-15
CMS_PAGE &getCurrentPage ([boolean $goDown = False], [boolean $online = True], [array $xtraConditions = Null], [boolean $debug = False])
  • boolean $goDown: (check children if the node has no page to show)
  • boolean $online: (check if the page is online if false all pages are returned)
  • array $xtraConditions: (array of columns to check to)
  • boolean $debug

Implementation of:
INFA_CMS_MENU_NODE::getCurrentPage()
returns the current Page this is the first page found and the user has rights to show
getDefaults (line 1121)

returns an array of db default values

  • since: pk-08-02-13
  • access: public
array getDefaults ([boolean $debug = FALSE])
  • boolean $debug

Redefinition of:
DBMS_TABLEOBJ::getDefaults()
returns an array of db default values
getFirstChild (line 1794)

returns the first child

  • since: pk-07-01-10
CMS_MENU_NODE &getFirstChild ([boolean $isOnline = TRUE], [boolean $useCache = TRUE], [boolean $debug = FALSE])
  • boolean $isOnline
  • boolean $useCache
  • boolean $debug
getForm (line 995)

returns the form used for manipulating the node

replaces dbGetForm and returns a OCSP_FORM

  • since: pk-07-08-21
  • requires: __OCSP_PHPINCPATH__/db/forms/OCSP_FORM.phpclass
  • access: public
OCSP_FORM &getForm ([int $mode = FRM_MODE_READONLY], [mixed $form = Null], [string $frmClass = 'CMS_MENU_FORM'], [boolean $debug = False])
  • int $mode
  • mixed $form: (string) form name (int) form id
  • string $frmClass
  • boolean $debug

Redefinition of:
DBMS_TABLEOBJ::getForm()
replaces dbGetForm and returns a OCSP_FORM
getFormClassName (line 974)

returns the form class name to use

if you overwrite this method make sure the returned form class source has been included

  • since: pk-08-11-01
  • access: public
string getFormClassName ()

Redefinition of:
DBMS_TABLEOBJ::getFormClassName()
returns the form class name to use
getFormName (line 959)

returns the required form name

normaly this function return Null to let $this->getForm decide which form ($this->getMyTable()) to use. In some subclasses it can be useful to overwrite this methode to get a special form

This is also a way to tell ajax reloads to change form. in jOCSP/formRPC.php is checked wether the currently loaded form (from the environment) fits to the forms tableobject if this function returns a value.

  • since: pk-08-11-01
  • access: public
string getFormName ()

Redefinition of:
DBMS_TABLEOBJ::getFormName()
returns the required form name
getHTMLLink (line 2362)

returns the <a ... </a> tag for the menu link

  • version: pk-05-01-21
  • version: pk-05-07-13
  • version: pk-05-11-02
  • version: pk-07-10-08
string getHTMLLink ([array $valArr = NULL], [string $aAddTag = ""], [boolean $debug = FALSE], [ $add_GETarr = NULL], boolean $addGetArr)
  • array $valArr
  • string $aAddTag
  • boolean $debug
  • boolean $addGetArr: array with get values to add to the link KEY=NAME
  • $add_GETarr
getId (line 408)

returns the id

int getId ()

Redefinition of:
DBMS_TREE_NODE::getId()
returns the id

Implementation of:
INFA_CMS_MENU_NODE::getId()
returns the menu id
getKey (line 433)

returns the menu key

the menu key is a '-' separeted string where the first part is the ocsp CMS MEN_ID

  • access: public
string getKey ()

Implementation of:
INFA_CMS_MENU_NODE::getKey()
returns the menu key
getLangId (line 491)

returns the language id

int getLangId ()
getLinkUrl (line 2228)

returns the link url

  • version: pk-06-08-07 bugfix
  • version: pk-06-09-28 $GLOBALS['OCSP_CMS']['MENLINKTMPL'] added
  • version: pk-08-06-20
  • since: pk-05-01-20
string getLinkUrl ([array $valArr = array()], [boolean $debug = False])
  • array $valArr
  • boolean $debug

Implementation of:
INFA_CMS_MENU_NODE::getLinkUrl()
returns the link url
getMenId (line 420)

returns the cms menu node id

  • version: pk-08-06-17
  • access: public
int getMenId ()
getMenuInclude (line 522)
void getMenuInclude ()
getMyCMSMenuNode (line 373)

abstract class to get the cms menu node for special menu objects overwrite in this classes

  • since: pk-07-10-15
CMS_MENU_NODE &getMyCMSMenuNode ([boolean $debug = FALSE])
  • boolean $debug
getMyProject (line 757)
void &getMyProject ([ $debug = False], [ $forceObj = True], [ $setAsCurrent = False])
  • $debug
  • $forceObj
  • $setAsCurrent

Implementation of:
INFA_CMS_MENU_NODE::getMyProject()
returns the Project Object
getNextSibling (line 1753)

returns the next menu (sibling)

first check if we have a menu node with the same parent and MEN_SORTORDER > $this->MEN_SORTORDER if not then go down in the tree if $goDown

  • since: pk-07-01-10
CMS_MENU_NODE &getNextSibling ([ $goDown = TRUE], [boolean $isOnline = TRUE], [boolean $useCache = TRUE], [boolean $debug = FALSE], boolean $goUp)
  • boolean $goUp
  • boolean $isOnline: return only a menu node which is currently online
  • boolean $useCache
  • boolean $debug
  • $goDown
getObjVarDef (line 395)

returns a array of variables used by the menu object

array[varName]=array( [TYPE] datatype [FLDCLASS] name of DBMS_FIELD* class [CLASSVALS] array of values of [FLDCLASS]

  • abstract:
  • access: protected
array getObjVarDef ([ $debug = False])
  • $debug

Redefined in descendants as:
getPageArray (line 2629)

gets an array of page database rows

2 additional "colums" are calculated:

SHOWFROM_OK SHOWTILL_OK

  • version: pk-07-10-01
  • version: pk-08-01-08 ($orderBy added)
  • todo: CMS_MENU_NODE::getPageArray() inline SQL
  • since: pk-04-07-26
array getPageArray ([boolean $showAll = FALSE], [string $whereAdd = ""], [boolean $debug = FALSE], [string $orderBy = ""])
  • boolean $showAll
  • string $whereAdd
  • boolean $debug
  • string $orderBy: (without keyword ORDER BY)
getPageId (line 2892)

returns the first pageId if $goDown and no page is found for the menu childs are asked for a page

  • version: pk-06-01-25
  • version: pk-05-07-12
  • version: pk-07-06-09
  • version: pk-07-08-16
  • requires: common/OCSP_DATE.phpclass
  • since: pk-04-08-05
  • access: public
int getPageId ([boolean $goDown = FALSE], [boolean $showAll = FALSE], [string $whereAdd = ""], [boolean $debug = FALSE])
  • boolean $goDown
  • boolean $showAll
  • string $whereAdd
  • boolean $debug
getPageKeyArr (line 2488)

returns an array with some page vales of the node

NOTE if $xtraConditions is set caching is disabled

  • return: (or null if the menu has no page)
  • version: pk-08-06-19
  • todo: caching
  • since: pk-07-08-15
array getPageKeyArr ([boolean $online = TRUE], [array $xtraConditions = NULL], [boolean $debug = FALSE])
  • boolean $online: (check if the page is online if false all pages are returned)
  • array $xtraConditions: (array of columns to check to)
  • boolean $debug
getPageList (line 2684)
  • return: of CMS_PAGE_V2*
  • version: pk-07-10-01
  • version: pk-08-08-12
  • todo: caching
  • since: pk-07-08-13
array getPageList ([boolean $useCache = True], [boolean $online = True], [boolean $debug = False])
  • boolean $useCache: (pages are stored in $GLOBALS['OCSP_VAL']['DBMS_TREE'][$this->getGlobalTreeKey()]['PAGES'])
  • boolean $online: (if true only pages to be shown online are returned)
  • boolean $debug
getPageTmplateId (line 2996)

returns the page template Id for the subpages

  • since: pk-08-06-07
  • access: public
int getPageTmplateId ([boolean $debug = False])
  • boolean $debug
getPageWhere (line 2570)

get the where clause to select the menu pages

  • version: pk-05-11-01
  • version: pk-06-11-12 only use language if set
  • since: pk-04-08-05
string getPageWhere ([boolean $showAll = FALSE], [string $whereAdd = ""], [boolean $debug = FALSE])
  • boolean $showAll
  • string $whereAdd
  • boolean $debug
getParentObj (line 599)

returns the parent object or null if parent is root

  • since: pk-08-06-17
CMS_MENU_NODE &getParentObj ([boolean $useCache = True], [boolean $debug = False])
  • boolean $useCache
  • boolean $debug

Redefinition of:
DBMS_TREE_NODE::getParentObj()
returns the parent object or null if parent is root

Implementation of:
INFA_CMS_MENU_NODE::getParentObj()
returns the parent object or null if parent is root
getPrevSibling (line 1701)

returns the previos menu (sibling)

first check if we have a menu node with the same parent and MEN_SORTORDER < $this->MEN_SORTORDER then go up in the tree if $goUp

  • since: pk-07-01-10
CMS_MENU_NODE &getPrevSibling ([boolean $goUp = TRUE], [boolean $isOnline = TRUE], [boolean $useCache = TRUE], [boolean $debug = FALSE])
  • boolean $goUp
  • boolean $isOnline: return only a menu node which is currently online
  • boolean $useCache
  • boolean $debug
getProjCrossLink_A (line 2936)

returns a link url to use in project tabs

the links are stored in column MEN_PROJCROSSLNK

  • todo: get parent link if not set
  • since: pk-04-12-06
string getProjCrossLink_A ([int $projId = 0], [ $addTag = ""], [ $debug = FALSE])
  • int $projId
  • $addTag
  • $debug
getProjId (line 808)

returns the project id

  • version: pk-05-08-11
int getProjId ()
getRootPath (line 1615)

returns a array back to the root if we have MEN_LINKTYPE 10 ($page->subMenu()) the page menu is included in the rootPath if $GLOBALS['CURRENT_PROJ']->curMen

  • version: pk-08-06-19
  • since: pk-05-07-25
array getRootPath ([boolean $useCache = True], [boolean $debug = False])
  • boolean $useCache
  • boolean $debug

Redefinition of:
DBMS_TREE_NODE::getRootPath()
returns a array back to the root (same as DBMS_TREE->getRootPath) but the tree is not populated saves time and space

Implementation of:
INFA_CMS_MENU_NODE::getRootPath()
returns a array back to the root
getShowGroup (line 1441)

returns the group id allowed for the page

  • access: public
int getShowGroup ()
getSideMenuLink (line 2043)

returns the html-code for the sidemenu link

string getSideMenuLink ([string $class = ""], [boolean $debug = FALSE])
  • string $class
  • boolean $debug
getTemplateId (line 547)

returns the template id set in menu or project

  • since: pk-08-06-16
  • access: public
int getTemplateId ([boolean $debug = False])
  • boolean $debug

Implementation of:
INFA_CMS_MENU_NODE::getTemplateId()
returns the template id set in menu or project
getTitle (line 457)
  • version: pk-07-01-18 parse template
  • version: pk-08-06-18 langId added
string getTitle ([int $langId = 0], [boolean $debug = False])
  • int $langId
  • boolean $debug

Implementation of:
INFA_CMS_MENU_NODE::getTitle()
getTitleAsDirName (line 2199)

converts the title to a dirname this can be used with url-rewriting

  • since: pk-06-07-27
string getTitleAsDirName ()
getTree (line 577)

returns myTree object

  • since: pk-08-06-17
CMS_MENU &getTree ([boolean $useCache = True], [boolean $debug = False], [boolean $checkParent = True])
  • boolean $useCache
  • boolean $debug
  • boolean $checkParent: (if false $this->getParentObj is not called)

Redefinition of:
DBMS_TREE_NODE::getTree()
returns myTree object

Implementation of:
INFA_CMS_MENU_NODE::getTree()
returns myTree object
hasChildrenToShow (line 1549)

checks if the node has children which are on

  • version: pk-05-06-14
  • version: pk-06-01-30 checkShow added
bool hasChildrenToShow ([boolean $filtered = FALSE], [boolean $checkDate = TRUE], [boolean $checkGroup = TRUE], [boolean $debug = FALSE], [ $checkShow = TRUE])
  • boolean $filtered: use filter
  • boolean $checkDate
  • boolean $checkGroup
  • boolean $debug
  • $checkShow
hasEditablePages (line 1861)

return if the menu type can have editable pages

if not the menu generates it's page object himself users are not able to add pages to the menu

  • since: pk-08-12-03
  • access: public
boolean hasEditablePages ([boolean $debug = False])
  • boolean $debug

Implementation of:
INFA_CMS_MENU_NODE::hasEditablePages()
return if the menu type can have editable pages
isCurrent (line 846)

checks if the menu is the current menu

  • version: pk-08-06-19
  • since: pk-06-02-23
boolean isCurrent ([boolean $debug = False])
  • boolean $debug

Implementation of:
INFA_CMS_MENU_NODE::isCurrent()
checks if the menu is the current menu
isDeleteable (line 1828)

returns if the node is deletable or not

  • since: pk-05-11-29
boolean isDeleteable ([boolean $debug = False])
  • boolean $debug
isEditable (line 1844)

returns if the node is editable

  • access: public
boolean isEditable ([boolean $debug = False])
  • boolean $debug

Implementation of:
INFA_CMS_MENU_NODE::isEditable()
returns if the node is editable
isEnabled (line 1415)

returns if MEN_SHOW is on

  • since: pk-07-08-23
boolean isEnabled ()
isInPath (line 2017)

checks if the object is in the rootPath $rPath if $rPath is not an array $GLOBALS['CURRENT_ROOTPATH'] is checked

  • since: pk-06-02-23
boolean isInPath ([array $rPath = NULL], [boolean $debug = FALSE])
  • array $rPath
  • boolean $debug
isToEcho (line 1513)

PROTOTYPE:

returns if the object is to echo in the tree when creating the html-code or only children are to show

  • return: (TRUE)
  • since: pk-06-05-30
boolean isToEcho ([boolean $debug = False])
  • boolean $debug

Implementation of:
INFA_CMS_MENU_NODE::isToEcho()
returns if the object is to echo in the tree when creating the html-code or only children are to show instead of the node

Redefined in descendants as:
  • PGP_CMS_MENU::isToEcho() : returns if the object is to echo in the tree when creating the html-code or only children are to show instead of the node
isToShow (line 1460)

checks if the node is on

  • version: pk-05-01-11
  • version: pk-06-01-30 checkShow added
  • version: pk-08-06-06
bool isToShow ([boolean $checkDate = True], [boolean $checkGroup = True], [boolean $debug = False], [ $checkShow = True])
  • boolean $checkDate
  • boolean $checkGroup
  • boolean $debug
  • $checkShow

Implementation of:
INFA_CMS_MENU_NODE::isToShow()
checks if the node is on
newChildObj (line 1647)

creates a child object out of database row checks $dbRow['MEN_OBJCLASS'] to determine the class of the new object

NOTE does not add the object to the tree only sets objects parent

  • version: pk-05-12-13
  • version: pk-07-08-10
  • version: pk-08-06-13
  • since: pk-05-11-22
object newChildObj (array $dbRow, [boolean $debug = False])
  • array $dbRow
  • boolean $debug

Redefinition of:
DBMS_TREE_NODE::newChildObj()
creates a child object out of database row
populateChildren (line 662)

populates the children

  • access: protected
double populateChildren ([boolean $useCache = True], [boolean $debug = False])
  • boolean $useCache
  • boolean $debug

Redefinition of:
DBMS_TREE_NODE::populateChildren()
populates the children

Redefined in descendants as:
populatePages (line 2441)

populates the pages from the database

  • since: pk-08-08-12
  • access: protected
array populatePages ([boolean $debug = False])
  • boolean $debug
setAsCurrent (line 830)

sets the node as current menu node

void setAsCurrent ([boolean $debug = FALSE])
  • boolean $debug

Implementation of:
INFA_CMS_MENU_NODE::setAsCurrent()
sets the node as current menu node
setDBVal (line 1151)

sets all fields of an array to the objcet if $valArr['PEARCACHE_TS'] isset this will become the populateTS

  • version: pk-07-06-16
  • since: pk-05-08-30
void setDBVal (array $valArr, [boolean $debug = FALSE])
  • array $valArr
  • boolean $debug

Redefinition of:
DBMS_TABLEOBJ::setDBVal()
sets all fields of an array to the objcet
setDisabled (line 1431)
  • since: pk-07-08-23
void setDisabled ()
setEnabled (line 1423)
  • since: pk-07-08-23
void setEnabled ()
setMyProject (line 729)

sets the project object of the page NOTE: does not set the current project ID the values of $this->PROJ_ID and $this->myProjObj->getId() can differ

  • version: pk-05-08-11
  • since: pk-05-07-11
void setMyProject ( &$aProjObj, [boolean $debug = FALSE], CMS_PROJECT $aProjObj)
setParentObj (line 501)

call parent::setParentObj and sets the project from the parent

void setParentObj ( &$aParent, CMS_MENU_NODE $aParent)

Redefinition of:
DBMS_TREE_NODE::setParentObj()

Implementation of:
INFA_CMS_MENU_NODE::setParentObj()
sets the parent object
setProjId (line 821)

sets the project id

  • since: pk-05-07-12
void setProjId (int $aId)
  • int $aId
setTitle (line 482)
  • since: pk-05-09-06
void setTitle (string $aTitle)
  • string $aTitle
validateClass (line 325)

checks if the object has the rigth class (type of $this->MEN_OBJCLASS) and returns the proper object

  • return: or child instance
  • version: pk-06-06-12
  • version: pk-08-06-15
  • since: pk-05-12-12
CMS_MENU_NODE validateClass ([ $debug = False], boolean $debug;)
  • boolean $debug;
  • $debug
validateCurrentMenu (line 357)

checks if the object is the current menu and returns the proper object

  • return: or child instance
  • since: pk-05-12-12
CMS_MENU_NODE validateCurrentMenu ([ $debug = FALSE], boolean $debug;)
  • boolean $debug;
  • $debug
writeSideMenuRow (line 2146)

writes a sidemneu row

void writeSideMenuRow ([string $class = ""], boolean $debug)
  • string $class: css-style class to use for <a>
  • boolean $debug
writeSideMenuRowOnPath (line 2160)

writes a sidemneu row on Path to the selected node

void writeSideMenuRowOnPath ( $treePath, [string $class = ""], [boolean $debug = FALSE])
  • string $class: css-style class to use for <a>
  • boolean $debug
  • $treePath

Inherited Methods

Inherited From DBMS_TREE_NODE

 DBMS_TREE_NODE::DBMS_TREE_NODE()
 DBMS_TREE_NODE::addChildNode()
 DBMS_TREE_NODE::changeParent()
 DBMS_TREE_NODE::changesParent()
 DBMS_TREE_NODE::childListIsPopulated()
 DBMS_TREE_NODE::filterAdd()
 DBMS_TREE_NODE::filterClear()
 DBMS_TREE_NODE::filterRemoveKey()
 DBMS_TREE_NODE::getChild()
 DBMS_TREE_NODE::getChildQueryString()
 DBMS_TREE_NODE::getChildrenList()
 DBMS_TREE_NODE::getChildTblName()
 DBMS_TREE_NODE::getGlobalTreeKey()
 DBMS_TREE_NODE::getId()
 DBMS_TREE_NODE::getLevel()
 DBMS_TREE_NODE::getOrderNr()
 DBMS_TREE_NODE::getParentId()
 DBMS_TREE_NODE::getParentObj()
 DBMS_TREE_NODE::getRootPath()
 DBMS_TREE_NODE::getRootPathIdx()
 DBMS_TREE_NODE::getTree()
 DBMS_TREE_NODE::hasChildren()
 DBMS_TREE_NODE::matchFilter()
 DBMS_TREE_NODE::moveChildDown()
 DBMS_TREE_NODE::moveChildUp()
 DBMS_TREE_NODE::newChildObj()
 DBMS_TREE_NODE::newTreeObj()
 DBMS_TREE_NODE::numberOfChildren()
 DBMS_TREE_NODE::populateChildren()
 DBMS_TREE_NODE::populateTree()
 DBMS_TREE_NODE::resortChildren()
 DBMS_TREE_NODE::setChildClassVar()
 DBMS_TREE_NODE::setConfigurationArr()
 DBMS_TREE_NODE::setId()
 DBMS_TREE_NODE::setLevel()
 DBMS_TREE_NODE::setLink()
 DBMS_TREE_NODE::setOrderNr()
 DBMS_TREE_NODE::setParentId()
 DBMS_TREE_NODE::setParentObj()
 DBMS_TREE_NODE::setTreeObj()

Inherited From DBMS_TABLEOBJ

 DBMS_TABLEOBJ::DBMS_TABLEOBJ()
 DBMS_TABLEOBJ::cacheRestore()
 DBMS_TABLEOBJ::cacheWriteTo()
 DBMS_TABLEOBJ::clearErrors()
 DBMS_TABLEOBJ::dbDelete()
 DBMS_TABLEOBJ::dbGetDataArray()
 DBMS_TABLEOBJ::dbGetForm()
 DBMS_TABLEOBJ::dbInsert()
 DBMS_TABLEOBJ::dbPopulate()
 DBMS_TABLEOBJ::dbReplace()
 DBMS_TABLEOBJ::dbSave()
 DBMS_TABLEOBJ::db_SetKey()
 DBMS_TABLEOBJ::db_SetKeyArray()
 DBMS_TABLEOBJ::getClassInclude()
 DBMS_TABLEOBJ::getDbDesc()
 DBMS_TABLEOBJ::getDBField()
 DBMS_TABLEOBJ::getDBRow()
 DBMS_TABLEOBJ::getDBVal()
 DBMS_TABLEOBJ::getDefaults()
 DBMS_TABLEOBJ::getErrorMsg()
 DBMS_TABLEOBJ::getFieldDBDefault()
 DBMS_TABLEOBJ::getForm()
 DBMS_TABLEOBJ::getFormClassName()
 DBMS_TABLEOBJ::getFormName()
 DBMS_TABLEOBJ::getJSON()
 DBMS_TABLEOBJ::getKeyArr()
 DBMS_TABLEOBJ::getMyTable()
 DBMS_TABLEOBJ::getObjValArray()
 DBMS_TABLEOBJ::getObjValValue()
 DBMS_TABLEOBJ::getPopulateTs()
 DBMS_TABLEOBJ::getWhere()
 DBMS_TABLEOBJ::hasChanged()
 DBMS_TABLEOBJ::hasColumn()
 DBMS_TABLEOBJ::hasErrors()
 DBMS_TABLEOBJ::hasObjVals()
 DBMS_TABLEOBJ::init()
 DBMS_TABLEOBJ::isInit()
 DBMS_TABLEOBJ::isPopulated()
 DBMS_TABLEOBJ::keysAreSet()
 DBMS_TABLEOBJ::populateFromKeys()
 DBMS_TABLEOBJ::populateFromValues()
 DBMS_TABLEOBJ::populateObjVals()
 DBMS_TABLEOBJ::p_cacheIsExpired()
 DBMS_TABLEOBJ::saveLinkedRow()
 DBMS_TABLEOBJ::saveLinkedTableRows()
 DBMS_TABLEOBJ::saveObjVals()
 DBMS_TABLEOBJ::setChanged()
 DBMS_TABLEOBJ::setDBField()
 DBMS_TABLEOBJ::setDBFieldIfDiff()
 DBMS_TABLEOBJ::setDBFieldIfEmpty()
 DBMS_TABLEOBJ::setDBRow()
 DBMS_TABLEOBJ::setDBVal()
 DBMS_TABLEOBJ::setDefaults()
 DBMS_TABLEOBJ::setError()
 DBMS_TABLEOBJ::setLinkedTableRow()
 DBMS_TABLEOBJ::setMyTable()
 DBMS_TABLEOBJ::setObjValArray()
 DBMS_TABLEOBJ::setObjValValue()
 DBMS_TABLEOBJ::setObjVarIfEmpty()
 DBMS_TABLEOBJ::setUnChanged()
 DBMS_TABLEOBJ::userIsAllowed()
 DBMS_TABLEOBJ::writeDebugInfo()
 DBMS_TABLEOBJ::xmladdDOMElement()
 DBMS_TABLEOBJ::xmlExport()
 DBMS_TABLEOBJ::_getCacheFileName()
 DBMS_TABLEOBJ::_getDBFields()

Inherited From OCSP_OBJ

 OCSP_OBJ::castObj()
 OCSP_OBJ::cloneMe()
 OCSP_OBJ::currentUser()
 OCSP_OBJ::dbConnect()
 OCSP_OBJ::defaultDBObj()
 OCSP_OBJ::defaultReadDBObj()
 OCSP_OBJ::defaultWriteDBObj()
 OCSP_OBJ::getConf()
 OCSP_OBJ::getDBObj()
 OCSP_OBJ::get_myClassConstant()
 OCSP_OBJ::get_myObject_vars()
 OCSP_OBJ::get_mySourceFile()
 OCSP_OBJ::isConnected()
 OCSP_OBJ::isMultiByteStr()
 OCSP_OBJ::isUTF8()
 OCSP_OBJ::setConf()
 OCSP_OBJ::setDBObj()
 OCSP_OBJ::set_myObject_vars()
 OCSP_OBJ::set_myVarsFrom()
Class Constants
CLASS_SRC_FILE = __FILE__ (line 50)

Inherited Constants

Inherited from DBMS_TABLEOBJ

DBMS_TABLEOBJ::CLASS_SRC_FILE

Inherited from OCSP_OBJ

OCSP_OBJ::CLASS_SRC_FILE

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