Source for file CMS_TABLEOBJ.phpclass
Documentation is available at CMS_TABLEOBJ.phpclass
* Class file CMS_TABLEOBJ.phpclass
* @project Open CSP-Management
* @author Peter Krebs (pk) <pitlinz@users.sourceforge.net>
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
// ---------------------------------------------------------
// ---------------------------------------------------------
* Abstract Class CMS_TABLEOBJ
* Extends DBMS_TABLEOBJ with some common cms aspects
* @project Open CSP-Management
* @author Peter Krebs (pk) <pitlinz@users.sourceforge.net>
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: CMS_TABLEOBJ.phpclass,v 1.40 2008/12/17 16:28:52 peterkrebs Exp $
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// -------------------- cms configuration ------------------------
* @static array $cms_conf_data
static $cms_conf_data =
array();
* returns a cms configuration
* @deprecated since pk-08-07-15
if (isset
(self::$cms_conf_data[$name]))
return self::$cms_conf_data[$name];
if (isset
($GLOBALS['OCSP_CMS'][$name]))
return $GLOBALS['OCSP_CMS'][$name];
if (isset
($OCSP_CONF[$name]))
return $OCSP_CONF[$name];
if (($arr_conf =
OCSP_OBJ::getConf('CMS')) && isset
($arr_conf[$name]))
* returns the CMS configuration array or
* @param unknown_type $subElem
* @deprecated since pk-08-07-15
return self::getCMSConf($subElem);
return self::$cms_conf_data;
// -------------------- menu types -------------------------------
/** ---------------------------------------------------------------
* @static array $cms_menu_types
static $cms_menu_types =
array();
* loads the cms menu types
if ($debug) echoDebugMethod(__FILE__
,"static","CMS_TABLEOBJ::menuType_populate();");
$bol_addToFCache =
False;
if (self::$cms_menu_types=
OCSP_CACHE_APC::getInstance('CMS')->getValue('MENUTYPES'))
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"<h1>OCSP_CACHE_APC </h1><p>self::\$cms_menu_types</p><pre>" .
print_r(self::$cms_menu_types,True) .
"<pre>");
if (self::$cms_menu_types=
OCSP_CACHE_FILE::getInstance('CMS')->getValue('MENUTYPES'))
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"<h1>OCSP_CACHE_FILE</h1><p>self::\$cms_menu_types </p><pre>" .
print_r(self::$cms_menu_types,True) .
"<pre>");
if (!$bol_loaded ||
!is_array(self::$cms_menu_types) ||
!sizeof(self::$cms_menu_types))
if (!(self::$cms_menu_types=
OCSP_OBJ::defaultReadDBObj()->getIndexedArray('T_CMS_MENUTYPE',array(),'MEN_OBJCLASS')))
throw
new Exception(_OCSP_EXCEP_CONFIGERROR_ .
":could not get CMS_MENUTYPES");
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"<h1>DB VALUES</h1><p>self::\$cms_menu_types</p><pre>" .
print_r(self::$cms_menu_types,True) .
"<pre>");
OCSP_CACHE_FILE::getInstance('CMS')->setValue('MENUTYPES',self::$cms_menu_types);
foreach(self::$cms_menu_types as $str_key =>
$arr_def)
$GLOBALS['OCSP_CMS']['MENUTYPE'][$str_key] =
$arr_def;
$GLOBALS['OCSP_CMS']['MENUTYPE'][$str_key]['CLASS'] =
$arr_def['MEN_OBJCLASS'];
$GLOBALS['OCSP_CMS']['MENUTYPE'][$str_key]['NAME'] =
$arr_def['MET_TITLE'];
$GLOBALS['OCSP_CMS']['MENUTYPE'][$str_key]['INCLUDE'] =
self::menuType_getClassSrc($arr_def['MEN_OBJCLASS'],False,$debug);
* returns the source file (absolute path) of a menutype
* @param string $aClassName
* @param boolean $canPopulate (to avoid endless loops)
if ($debug) echoDebugLine(__FILE__
,"static","CMS_TABLEOBJ::menuType_getClassSrc(".
$aClassName.
");");
if (!isset
(self::$cms_menu_types[$aClassName]))
if ($canPopulate) self::menuType_populate($debug);
if (!isset
(self::$cms_menu_types[$aClassName]))
$arr_type =
&self::$cms_menu_types[$aClassName];
switch($arr_type['MET_SYSTEM'])
if (!intval($arr_type['MOD_ID']))
return pcf_checkFilePath($obj_module->getModuleIncPath() .
"/" .
$arr_type['MET_INCLUDE']);
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"SYSTEM: " .
$arr_type['MET_SYSTEM']);
if (isset
($GLOBALS[$arr_type['MET_SYSTEM']]['PHPINCPATH']))
$str_file =
pcf_checkFilePath($GLOBALS[$arr_type['MET_SYSTEM']]['PHPINCPATH'] .
"/" .
$arr_type['MET_INCLUDE']);
* require menu object class
if ($debug) echoDebugMethod(__FILE__
,"static","CMS_TABLEOBJ::menuType_requireClass()");
if ($str_src =
self::menuType_getClassSrc($aClassName,True,$debug))
* clears the menuType cache
self::$cms_menu_types=
array();
// -------------------- page template types ------------------------
* @staticvar array $cms_pageTmpl_types
static $cms_pageTmpl_types =
array();
* loads the cms page types
if ($debug) echoDebugMethod(__FILE__
,"static","CMS_TABLEOBJ::pageTmplType_populate();");
$bol_addToFCache =
False;
if (self::$cms_pageTmpl_types=
OCSP_CACHE_APC::getInstance('CMSTEMPL')->getValue('PAGETEMPLTYPES'))
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"<h1>OCSP_CACHE_APC </h1><p>self::\$cms_pageTmpl_types</p><pre>" .
print_r(self::$cms_pageTmpl_types,True) .
"<pre>");
if (self::$cms_pageTmpl_types=
OCSP_CACHE_FILE::getInstance('CMSTEMPL')->getValue('PAGETEMPLTYPES'))
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"<h1>OCSP_CACHE_FILE</h1><p>self::\$cms_page_types </p><pre>" .
print_r(self::$cms_pageTmpl_types,True) .
"<pre>");
if (!$bol_loaded ||
!is_array(self::$cms_pageTmpl_types) ||
!sizeof(self::$cms_pageTmpl_types))
if (!(self::$cms_pageTmpl_types=
OCSP_OBJ::defaultReadDBObj()->getIndexedArray('T_CMS_TMPL_PAGETYPE',array(),'PTMP_OBJCLASS')))
throw
new Exception(_OCSP_EXCEP_CONFIGERROR_ .
":could not get CMS_PAGETYPES");
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"<h1>DB VALUES</h1><p>self::\$cms_pageTmpl_types</p><pre>" .
print_r(self::$cms_pageTmpl_types,True) .
"<pre>");
OCSP_CACHE_FILE::getInstance('CMSTEMPL')->setValue('PAGETEMPLTYPES',self::$cms_pageTmpl_types);
* returns the source file (absolute path) of a pagetype
* @param string $aClassName
* @param boolean $canPopulate (to avoid endless loops)
if ($debug) echoDebugLine(__FILE__
,"static","CMS_TABLEOBJ::pageType_getClassSrc(".
$aClassName.
");");
if (!isset
(self::$cms_pageTmpl_types[$aClassName]))
if ($canPopulate) self::pageTmplType_populate($debug);
if (!isset
(self::$cms_pageTmpl_types[$aClassName]))
$arr_type =
&self::$cms_pageTmpl_types[$aClassName];
switch($arr_type['PTMT_SYSTEM'])
if (!intval($arr_type['MOD_ID']))
return pcf_checkFilePath($obj_module->getModuleIncPath() .
"/" .
$arr_type['PTMT_INCLUDE']);
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"SYSTEM: " .
$arr_type['PTMT_SYSTEM']);
if (isset
($GLOBALS[$arr_type['PTMT_SYSTEM']]['PHPINCPATH']))
$str_file =
pcf_checkFilePath($GLOBALS[$arr_type['PTMT_SYSTEM']]['PHPINCPATH'] .
"/" .
$arr_type['PTMT_INCLUDE']);
* require page object class
if ($debug) echoDebugMethod(__FILE__
,"static","CMS_TABLEOBJ::pageTmplType_requireClass()");
if ($str_src =
self::pageTmplType_getClassSrc($aClassName,True,$debug))
// -------------------- page types ---------------------------------
/** ---------------------------------------------------------------
* @static array $cms_page_types
static $cms_page_types =
array();
* loads the cms page types
if ($debug) echoDebugMethod(__FILE__
,"static","CMS_TABLEOBJ::pageType_populate();");
$bol_addToFCache =
False;
if (self::$cms_page_types=
OCSP_CACHE_APC::getInstance('CMS')->getValue('PAGETYPES',$debug))
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"<h1>OCSP_CACHE_APC </h1><p>self::\$cms_page_types</p><pre>" .
print_r(self::$cms_page_types,True) .
"<pre>");
if ($debug) echoDebugLine(__FILE_,__LINE__
,"APC VALUES: <pre>" .
print_r(self::$cms_page_types) .
"</pre>");
if ($useCache &&
!$bol_loaded &&
(OCSP_CACHE_FILE::isUseable()))
if (self::$cms_page_types=
OCSP_CACHE_FILE::getInstance('CMS')->getValue('PAGETYPES',$debug))
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"<h1>OCSP_CACHE_FILE</h1><p>self::\$cms_page_types </p><pre>" .
print_r(self::$cms_page_types,True) .
"<pre>");
if (!$bol_loaded ||
!is_array(self::$cms_page_types) ||
!sizeof(self::$cms_page_types))
if (!(self::$cms_page_types=
OCSP_OBJ::defaultReadDBObj()->getIndexedArray('T_CMS_PAGETYPE',array(),'PAG_OBJCLASS')))
throw
new Exception(_OCSP_EXCEP_CONFIGERROR_ .
":could not get CMS_PAGETYPES");
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"<h1>DB VALUES</h1><p>self::\$cms_page_types</p><pre>" .
print_r(self::$cms_page_types,True) .
"<pre>");
if ($bol_useAPC &&
$bol_addToAPC)
OCSP_CACHE_FILE::getInstance('CMS')->setValue('PAGETYPES',self::$cms_page_types);
foreach(self::$cms_page_types as $str_key =>
$arr_def)
//echoDebugLine(__FILE__,__LINE__,"<hr /><pre>" . print_r($arr_def,True) . "</pre>");
if (!isset
($arr_def['PAT_TMPLCLASS'])) $arr_def['PAT_TMPLCLASS'] =
'CMS_PAGE_TEMPLATE';
if ($debug) echo
"$str_key: <pre>" .
print_r($arr_def,True) .
"</pre>";
$GLOBALS['OCSP_CMS']['PAGETYPE'][$str_key]=
array(
'TMPLCLASS' =>
$arr_def['PAT_TMPLCLASS'],
'INCLUDE' =>
self::pageTmplType_getClassSrc($arr_def['PAT_TMPLCLASS'],True,$debug),
'OBJINC' =>
self::pageType_getClassSrc($str_key,False,$debug),
'DOCTYPE' =>
"HTML 4.0 Transitional",
'NAME' =>
$arr_def['PAT_TITLE'],
* returns the source file (absolute path) of a pagetype
* @param string $aClassName
* @param boolean $canPopulate
if ($debug) echoDebugMethod(__FILE__
,"static","CMS_TABLEOBJ::pageType_getClassSrc(".
$aClassName.
");");
if (!isset
(self::$cms_page_types[$aClassName]))
if ($canPopulate) self::pageType_populate($debug);
if (!isset
(self::$cms_page_types[$aClassName]))
$arr_type =
self::$cms_page_types[$aClassName];
if (!isset
($arr_type['PAT_SYSTEM']))
$arr_type['PAT_SYSTEM'] =
'OCSP';
switch($arr_type['PAT_SYSTEM'])
if (!intval($arr_type['MOD_ID']))
return pcf_checkFilePath($obj_module->getModuleIncPath() .
"/" .
$arr_type['PAT_INCLUDE']);
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"SYSTEM: " .
$arr_type['PAT_SYSTEM']);
if (isset
($GLOBALS[$arr_type['PAT_SYSTEM']]['PHPINCPATH']))
$str_file =
pcf_checkFilePath($GLOBALS[$arr_type['PAT_SYSTEM']]['PHPINCPATH'] .
"/" .
$arr_type['PAT_INCLUDE']);
* require page object class
if ($debug) echoDebugMethod(__FILE__
,"static","CMS_TABLEOBJ::pageType_requireClass()");
if ($str_src =
self::pageType_getClassSrc($aClassName,True,$debug))
* returns the default template class name of a page type
* @param string $aClassName
if (!isset
(self::$cms_page_types[$aClassName]))
self::pageType_populate($debug);
if (!isset
(self::$cms_page_types[$aClassName]))
return "CMS_PAGE_TEMPLATE";
} else if (!isset
(self::$cms_page_types[$aClassName]['PAT_TMPLCLASS'])) {
return "CMS_PAGE_TEMPLATE";
} else if (empty(self::$cms_page_types[$aClassName]['PAT_TMPLCLASS'])) {
return "CMS_PAGE_TEMPLATE";
return self::$cms_page_types[$aClassName]['PAT_TMPLCLASS'];
* returns an array with all page types
if (!sizeof(self::$cms_page_types))
self::pageType_populate($debug);
return self::$cms_page_types;
// -------------------- current elements ----------------------------
* @staticvar CMS_PROJECT $currentProject
protected static $currentProj =
Null;
* @staticvar CMS_MENU_NODE $currentMenu
protected static $currentMenu =
Null;
* @staticvar CMS_PAGE $currentPage
protected static $currentPage =
Null;
if (pcf_is_instance_of($this,'CMS_TABLEOBJ'))
* returns the page sort column
return $this->colPrevix .
"SORTORDER";
* returns the page table name
* facotries the current elements from the environment
if ($debug) echoDebugMethod(__FILE__
,"static","CMS_TABLEOBJ::factoryCurrentElements()");
$int_projId =
(isset
($_GET[self::getProjIdGetName()]) ?
intval($_GET[self::getProjIdGetName()]) :
(isset
($_GET[self::getProjIdColName()]) ?
intval($_GET[self::getProjIdColName()]) :
0));
$str_menId =
(isset
($_GET[self::getMenuIdGetName()]) ?
$_GET[self::getMenuIdGetName()] :
(isset
($_GET[self::getMenuIdColName()]) ?
$_GET[self::getMenuIdColName()] :
0));
$int_pagId =
(isset
($_GET[self::getPageIdGetName()]) ?
intval($_GET[self::getPageIdGetName()]) :
(isset
($_GET[self::getPageIdColName()]) ?
intval($_GET[self::getPageIdColName()]) :
0));
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"using pageId: {$int_pagId}");
if (self::$currentPage =
CMS_PAGE::factoryFromId($int_pagId,False,$debug))
self::$currentMenu =
self::$currentPage->getMyMenuNode($debug);
self::$currentProj =
self::$currentPage->getMyProject($debug);
case (!empty($str_menId)):
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"using menu: {$str_menId}");
//$debug=True;echoDebugLine(__FILE__,__LINE__,"debug on");
if (self::$currentPage =
$obj_menu->getCurrentPage(True,True,Null,$debug))
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"<h2>pageMenu: " .
self::$currentPage->getMyMenuNode()->getId() .
" env: " .
$obj_menu->getId() .
"</h2>");
if (self::$currentPage->getMyMenuNode()->getId() !=
$obj_menu->getId())
self::$currentMenu =
self::$currentPage->getMyMenuNode();
self::$currentMenu =
$obj_menu;
self::$currentProj =
self::$currentPage->getMyProject($debug);
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"<h2>Set to: Proj:" .
self::$currentProj->getId() .
" Menu: " .
self::$currentMenu->getId() .
" Page: " .
self::$currentPage->getId() .
"</h2>");
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"using projId: {$int_projId}");
if (self::$currentProj =
CMS_PROJECT::factoryFromId($int_projId))
self::$currentPage =
self::$currentProj->getCurrentPage($debug);
self::$currentMenu =
self::$currentPage->getMyMenuNode($debug);
self::$currentPage =
self::$currentProj->getCurrentPage($debug);
self::$currentMenu =
self::$currentPage->getMyMenuNode($debug);
if (self::$currentProj =
CMS_PROJECT::factoryFromEnv($debug))
self::$currentPage =
self::$currentProj->getCurrentPage($debug);
self::$currentMenu =
self::$currentPage->getMyMenuNode($debug);
* returns the current project
* if !isset self::$currentProj and $OCSP_OBJ['CUR_CMSPROJ'] is set
* $OCSP_OBJ['CUR_CMSPROJ'] is set as current project
if (!self::$currentProj && isset
($OCSP_OBJ['CUR_CMSPROJ']))
self::$currentProj =
$OCSP_OBJ['CUR_CMSPROJ'];
return self::$currentProj;
* returns the current menu node
* @version pk-08-10-05 (compate with old global $OCSP_OBJ)
if (!self::$currentMenu ||
!is_object(self::$currentMenu))
if (isset
($OCSP_OBJ['CUR_CMSMENU']) &&
is_object($OCSP_OBJ['CUR_CMSMENU']))
self::$currentMenu =
$OCSP_OBJ['CUR_CMSMENU'];
self::$currentMenu = self::$currentProj->getCurrentMenuNode();
return self::$currentMenu;
if (!self::$currentPage ||
!is_object(self::$currentPage))
if (self::$currentMenu ||
is_object(self::$currentMenu))
self::$currentPage =
self::$currentMenu->getCurrentPage(False,True);
return self::$currentPage;
* @param CMS_PROJECT $project
if ($debug) echoDebugMethod(__FILE__
,"static","CMS_TABLEOBJ::set_currentProj()",get_class($project));
self::$currentProj =
$project;
echoDebugLine(__FILE__
,__LINE__
,get_class($project).
" does not implements INFA_CMS_PROJECT");
* @param CMS_MENU $menNode
if ($debug) echoDebugMethod(__FILE__
,"static","CMS_TABLEOBJ::set_currentMenu()");
self::$currentMenu =
$menNode;
self::set_currentProj($menNode->getMyProject(),$debug);
if ($debug) echoDebugMethod(__FILE__
,"static","CMS_TABLEOBJ::set_currentPage()");
self::$currentPage =
$page;
self::set_currentMenu(self::$currentPage->getMyMenuNode());
/** -----------------------------------------------------
/** -----------------------------------------------------
* @var OCSP_CMS_PEARCACHE $myCmsCache
* @var CMS_PROJECT $myProjObj
* @var CMS_MENU_NODE $myMenuNode
* @var CMS_PAGE $myPageObj
/** -----------------------------------------------------
* @var string $myProjIdGetName
* @staticvar string $myMenuIdCol
* @var string $myMenuIdGetName
* @staticvar string $myPageIdCol
* @var string $myPageIdGetName
* @see CMS_TABLEOBJ::getPageIdGetName()
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* sets all fields of an array to the objcet
* if $valArr['PEARCACHE_TS'] isset this will become the populateTS
function setDBVal($valArr,$debug=
FALSE) {
if ($debug) echoDebugMethod(__FILE__
,get_class($this),"CMS_TABLEOBJ::setDBVal()");
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"\$valArr is not an array");
if (isset
($valArr['PEARCACHE_TS']))
unset
($valArr['PEARCACHE_TS']);
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* returns the cms project id
if ($debug) echoDebugMethod(__FILE__
,__LINE__
,"CMS_TABLEOBJ::getProjId()");
* sets the cms project id
* @param $aId int Project ID
* @version pk-05-09-05 bugfix
* sets the project object of the page
* @param CMS_PROJECT aProjObj
* @global array $OCSP_OBJ;
* @version pk-06-07-26 setting project ID too
* @version pk-07-08-13 setting memory cache
* returns the Project Object
* @param boolean $setAsCurrent if true and method $this->setAsCurrent() exists it will be called
* @param boolean $forceObj (if true a new object will be instanciated if none is set)
* @requires CMS_PROJECT.phpclass
function &getMyProject($setAsCurrent=
False,$debug=
False,$forceObj=
True)
if ($setAsCurrent &&
method_exists($this,'setAsCurrent')) $this->setAsCurrent($debug);
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"returning \$this->myProjObj");
if ($setAsCurrent &&
method_exists($this,'setAsCurrent')) $this->setAsCurrent($debug);
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"returning \$this->myPageObj->getMyProject");
if ($setAsCurrent &&
method_exists($this,'setAsCurrent')) $this->setAsCurrent($debug);
if ($setAsCurrent &&
method_exists($this,'setAsCurrent')) $this->setAsCurrent($debug);
if ($setAsCurrent &&
method_exists($this,'setAsCurrent')) $this->setAsCurrent($debug);
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"returning populated object");
if ($setAsCurrent &&
method_exists($this,'setAsCurrent')) $this->setAsCurrent($debug);
* returns the cms language id
return intval($this->LANG_ID);
* sets the cms language id
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* returns the cms menu id
* returns the menu node of the object
* if $this->myMenuNode is not set or NULL a new object is generated
* if $this->myMenuNode->getId() != $this->getMenId() a new objec is generated
* @version pk-07-08-14 memory and pear cache usage
// this is not a page object get menu from $this->myPageObj
//if ($this->myMenuNode=$this->myPageObj->getMenuNode($debug))
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"getMyMenuNode() returns menu from key: " .
$this->getMenKey());
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"getMyMenuNode() returns menu from Id: " .
$this->getMenId());
ocsp_logError(__FILE__
,__LINE__
,"could not get menu tree form \$this->myProjObj",E_WARNING);
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"getMyMenuNode() returns menu from Id: " .
$this->getMenId());
* sets the menu node object
* @param CMS_MENU_NODE $aNode
* checks if $this->myMenuNode has a project object
* if not $this->getMyProject is set to the menu
* @return CMS_MENU_NODE $this->myMenuNode
* retuns the link url of the menu (without page)
return $o_menObj->getLinkUrl($debug);
* returns the previous menĂ¼ id
* goes up in the tree if no suitable sibling is found
* @param boolean $onlineOnly only check menus which are currently online
if ($o_menNode=
$o_menObj->getPrevSibling(TRUE,TRUE,TRUE,$debug)) {
return $o_menNode->getId();
* returns the previous menĂ¼ id
* goes up in the tree if no suitable sibling is found
* @param boolean $onlineOnly only check menus which are currently online
if ($o_menNode=
$o_menObj->getNextSibling(TRUE,TRUE,TRUE,$debug)) {
return $o_menNode->getId();
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* returns the cms page id
* @param CMS_PAGE $aPageObj
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"PageId set to ".
$this->getPageId().
" PROJ_ID:".
$aPageObj->getDBField('PROJ_ID'));
* @version pk-08-05-09 bugfix
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"returning set object");
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* returns if the cms cache is usable
* if (_OCSP_USEPEARCACHE_) it's ensured that
* $GLOBALS['OCSP_OBJ']['CMS_PEARCHACHE'] is an object
require_once $GLOBALS['OCSP_CMS']['PHPINCPATH'].
"OCSP_CMS_PEARCACHE.phpclass";
// avoid setting when called static
$this->myCmsCache=
&$GLOBALS['OCSP_OBJ']['CMS_PEARCHACHE'];
* sets the values from a cache array
* if the object is not populated or have an older populateTS
if (!$cacheArr ||
!is_array($cacheArr)) {
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"\$cacheArr is not an array");
if (!isset
($cacheArr['PEARCACHE_TS']) ||
!doubleval($cacheArr['PEARCACHE_TS']))
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"\$cacheArr has no timestamp");
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"object already populated with newer values");
return (intval($this->getId()) ?
TRUE :
FALSE);
Documentation generated on Thu, 08 Jan 2009 17:40:11 +0100 by phpDocumentor 1.4.0a2