Class CMS_PAGE_V2

Description

class to handel PAGES

major change to old version:

  • the page don't hold a DB object only the GLOBAL INDEX is passed
  • parent class is CMS_TABLEOBJ

  • author: Peter Krebs <p.krebs@lvus.at>
  • version: pk-03-10-24 parent changed DBMS_TBLOBJ -> CMS_TBLOBJ
  • copyright: (c) 2002-2003 by Peter Krebs and Landesverlag Unternehmensservice

Located in /cms/page/CMS_PAGE_V2.phpclass (line 37)

OCSP_OBJ
   |
   --DBMS_TABLEOBJ
      |
      --CMS_TABLEOBJ
         |
         --CMS_PAGE
            |
            --CMS_PAGE_V2
Direct descendents
Class Description
 class CMS_IFRAME_PAGE class to handel PAGES with php code included
 class CMS_LIST_PAGE class CMS_LIST_PAGE
 class CMS_MEDIA_PAGE class to handel PAGES with list of medias and show medias
 class CMS_PHPINC_PAGE class to handel PAGES with php code included
 class CMS_SUMMARYPAGE Class CMS_SUMMARYPAGE
Class Constant Summary
 CLASS_SRC_FILE = __FILE__
Variable Summary
Method Summary
 CMS_PAGE_V2 CMS_PAGE_V2 ([int $projId = 0], [int $menId = 0], [int $aId = 0], [int $langId = 0], [bool $debug = False])
 CMS_PAGE_V2* CMS_PAGE_FROM_DBROW (array $dbRow, [boolean $debug = False], CMS_MENU_NODE $aMenuNode)
 CMS_PAGE_V2* CMS_PAGE_FROM_GET ([boolean $debug = False])
 CMS_PAGE_V2 CMS_PAGE_SUBCLASS_NAME (string $className, [boolean $debug = False])
 boolean dbDelete ([boolean $backupData = False], [boolean $debug = False])
 int dbInsert ([bool $debug = False])
 string getBodyInclude ([boolean $debug = False])
 void getChapQuery ([ $showAllStates = False], [ $showTimedOut = False], [ $showFuture = False], [ $showGroup = False], [ $addWhere = ""], [ $debug = False])
 TMPL_CHAPTER_V3 &getChaTemplateObj (int $tmplId, [boolean $debug = False])
 DBMS_FORM &getFeedbackForm ([string $fbFormName = "T_CMS_FEEDBACK"], [boolean $debug = False])
 int getId ()
 string getObjClass ([ $debug = False], boolean $debug;)
 array getObjVarDef ([ $debug = False])
 int getOrderNr ()
 void loadChaTemplate (int $tmplId, [boolean $debug = False])
 int loadTemplate ([boolean $debug = False], [boolean $enableEmpty = True])
 void moveSortDown (boolean $debug)
 boolean moveSortFirst ([boolean $allStates = True], [boolean $debug = False])
 boolean moveSortLast ([boolean $allStates = True], [boolean $debug = False])
 void moveSortUp (boolean $debug)
 CMS_PAGE_V2 &populateValidated ([boolean $debug = False])
 array saveFeedBackForm ( &$frmObj, [string $postName = "DBVAL"], [boolean $debug = False], DBMS_FORM $frmObj)
 boolean setAsCurrent (boolean $debug)
 void setDefaults ([bool $debug = False])
 void setId (int $aId)
 void setTemplateId ( $ptmpId, int $ptmplId)
Variables
static mixed $cmsPageList = array() (line 52)

unit of work singleton

  • staticvar: array $cmsPageList:
  • since: pk-08-03-11
mixed $chapPrevix = "CHA_" (line 109)
  • staticvar: string $chapPrevix: prefix used in chapter table for column names
array $chaTmpl = array() (line 73)
  • var: (an array with chapter template objects used)
  • access: protected
array $chaTmplArr = array() (line 126)
  • var: with loaded chapter templates to avoid reloading
mixed $colPrevix = "PAG_" (line 85)
  • staticvar: string $colPrevix: fields in $this->myTable starts with
  • access: protected
mixed $cTable = "T_CMS_CHAPTER" (line 105)
  • staticvar: string $cTable: name of the chapter table
mixed $ctmplClass = "TMPL_CHAPTER_V3" (line 100)
  • staticvar: string $ctmplClass: name of the default chapter template class (is used to generate a new chapter template object)
string $ctmplFldPrevix = "CTMP_" (line 121)
  • var: prefix of the template columns
mixed $ctmplTable = "T_CMS_TMPL_CHAPTER" (line 96)
  • staticvar: string $ctmplTable: name of the chapter template table
mixed $moduleKey = "CMS" (line 132)
  • staticvar: string $moduleKey:
  • since: pk-06-02-17
mixed $myChapterClass = "CMS_CHAPTER_V2" (line 116)
  • staticvar: string $myChapterClass:
  • since: pk-05-10-10 NOTE make sure the class is included before calling chapter methods
mixed $myClassName = "CMS_PAGE_V2" (line 90)
  • staticvar: string $myClassName: name of the class
  • access: protected

Redefined in descendants as:
CMS_PAGE_TEMPLATE $myTmpl = NULL (line 67)
  • access: protected

Redefinition of:
CMS_PAGE::$myTmpl
int $nextId = 0 (line 147)

next page id

  • access: protected
int $prevId = 0 (line 140)

previous page id

  • access: protected

Inherited Variables

Inherited from CMS_PAGE

CMS_PAGE::$dbRow
CMS_PAGE::$formObj
CMS_PAGE::$langId
CMS_PAGE::$myDB
CMS_PAGE::$myForm
CMS_PAGE::$myTable
CMS_PAGE::$pageId
CMS_PAGE::$projId

Inherited from CMS_TABLEOBJ

CMS_TABLEOBJ::$cms_conf_data
CMS_TABLEOBJ::$cms_menu_types
CMS_TABLEOBJ::$cms_pageTmpl_types
CMS_TABLEOBJ::$cms_page_types
CMS_TABLEOBJ::$currentMenu
CMS_TABLEOBJ::$currentPage
CMS_TABLEOBJ::$currentProj
CMS_TABLEOBJ::$myCmsCache
CMS_TABLEOBJ::$myMenuIdCol
CMS_TABLEOBJ::$myMenuIdGetName
CMS_TABLEOBJ::$myMenuNode
CMS_TABLEOBJ::$myPageIdCol
CMS_TABLEOBJ::$myPageIdGetName
CMS_TABLEOBJ::$myPageObj
CMS_TABLEOBJ::$myProjIdCol
CMS_TABLEOBJ::$myProjIdGetName
CMS_TABLEOBJ::$myProjObj

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
Constructor CMS_PAGE_V2 (line 176)

init the object and populates it if (intval($aId))

  • version: pk-05-07-26
CMS_PAGE_V2 CMS_PAGE_V2 ([int $projId = 0], [int $menId = 0], [int $aId = 0], [int $langId = 0], [bool $debug = False])
  • int $projId: the project ID
  • int $menId: the menu ID
  • int $aId: the page ID
  • int $langId: the language ID
  • bool $debug
CMS_PAGE_FROM_DBROW (line 252)
  • since: pk-07-08-13
CMS_PAGE_V2* CMS_PAGE_FROM_DBROW (array $dbRow, [boolean $debug = False], CMS_MENU_NODE $aMenuNode)
CMS_PAGE_FROM_GET (line 281)
CMS_PAGE_V2* CMS_PAGE_FROM_GET ([boolean $debug = False])
  • boolean $debug
CMS_PAGE_SUBCLASS_NAME (line 201)
CMS_PAGE_V2 CMS_PAGE_SUBCLASS_NAME (string $className, [boolean $debug = False])
  • string $className
  • boolean $debug
dbDelete (line 552)

deletes the row from the database and all chapters

  • version: pk-05-09-06
  • version: pk-05-10-05
  • since: pk-05-03-12
boolean dbDelete ([boolean $backupData = False], [boolean $debug = False])
  • boolean $backupData
  • boolean $debug

Redefinition of:
DBMS_TABLEOBJ::dbDelete()
dbInsert (line 496)
  • return: returns the autoIncFld ID if exists or 1 on success
  • version: pk-07-06-07
  • since: pk-05-09-06
int dbInsert ([bool $debug = False])
  • bool $debug: show debug info

Redefinition of:
DBMS_TABLEOBJ::dbInsert()
inserts a new row to the table
getBodyInclude (line 839)

returns the body include file from the page template "" if none is set or no template could be loaded

  • since: pk-06-02-17
string getBodyInclude ([boolean $debug = False])
  • boolean $debug
getChapQuery (line 973)
void getChapQuery ([ $showAllStates = False], [ $showTimedOut = False], [ $showFuture = False], [ $showGroup = False], [ $addWhere = ""], [ $debug = False])
  • $showAllStates
  • $showTimedOut
  • $showFuture
  • $showGroup
  • $addWhere
  • $debug

Redefined in descendants as:
getChaTemplateObj (line 930)

returns the template object with ID $tmplId

  • since: pk-05-07-28
TMPL_CHAPTER_V3 &getChaTemplateObj (int $tmplId, [boolean $debug = False])
  • int $tmplId
  • boolean $debug
getFeedbackForm (line 772)

returns the feedback form object

  • since: pk-05-05-02
DBMS_FORM &getFeedbackForm ([string $fbFormName = "T_CMS_FEEDBACK"], [boolean $debug = False])
  • string $fbFormName
  • boolean $debug
getId (line 346)
  • return: the page id
int getId ()

Redefinition of:
CMS_PAGE::getId()
getObjClass (line 373)

returns the class name of the page object stored in the db

  • since: pk-05-11-21
string getObjClass ([ $debug = False], boolean $debug;)
  • boolean $debug;
  • $debug
getObjVarDef (line 306)

returns a array of variables used by the page object

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

  • since: pk-04-08-10
  • access: protected
array getObjVarDef ([ $debug = False])
  • $debug

Redefined in descendants as:
getOrderNr (line 391)
  • since: pk-07-08-13
int getOrderNr ()
loadChaTemplate (line 899)

Overwrite in inherit classes with other tables or objects

  • version: pk-05-08-26
  • requires: $GLOBALS['OCSP_CMS']['PHPINCPATH']."template/chapter/TMPL_CHAPTER_V3.phpclass";
void loadChaTemplate (int $tmplId, [boolean $debug = False])
  • int $tmplId
  • boolean $debug
loadTemplate (line 879)

loads the page template object if $this->myTemplate is not set or has a different ID

uses $GLOBALS['OCSP']['CACHE'][$this->moduleKey.'PAGE_TEMPLATES'] as memory cache

  • return: 1 on success
    1. on error
    -1 empty template
  • version: pk-05-12-13 enableEmpty added
  • version: pk-06-02-16 use $this->{$this->ptmplFld} instead of $this->PTMP_ID; use Cache
  • version: pk-07-06-07 use cache ask menu and project for PTMP_ID
  • deprecated: since pk-08-06-19
int loadTemplate ([boolean $debug = False], [boolean $enableEmpty = True])
  • boolean $debug: show debug information
  • boolean $enableEmpty

Redefinition of:
CMS_PAGE::loadTemplate()
moveSortDown (line 735)

moves the page on position up in the sortorder increase PAG_SORTORDER

  • since: pk-05-07-26
void moveSortDown (boolean $debug)
  • boolean $debug
moveSortFirst (line 610)

moves the page to the first positon (SORTORDER)

  • version: pk-05-07-26
  • todo: only $allStates=True coded now
boolean moveSortFirst ([boolean $allStates = True], [boolean $debug = False])
  • boolean $allStates
  • boolean $debug
moveSortLast (line 648)

moves the page to the last positon (SORTORDER)

  • version: pk-05-07-26
  • todo: only $allStates=True coded now
boolean moveSortLast ([boolean $allStates = True], [boolean $debug = False])
  • boolean $allStates
  • boolean $debug
moveSortUp (line 691)

moves the page on position up in the sortorder decrease PAG_SORTORDER

  • since: pk-05-07-26
void moveSortUp (boolean $debug)
  • boolean $debug
populateValidated (line 438)

populates the page and checks if the current object ($this) is of the class stored in the database PAG_OBJCLASS if this differs a new page object with the right class is returned

  • since: pk-07-08-14
CMS_PAGE_V2 &populateValidated ([boolean $debug = False])
  • boolean $debug
saveFeedBackForm (line 798)

stores feedback data and returns the data array or null if an error occured

  • since: pk-05-05-02
array saveFeedBackForm ( &$frmObj, [string $postName = "DBVAL"], [boolean $debug = False], DBMS_FORM $frmObj)
  • DBMS_FORM $frmObj
  • string $postName
  • boolean $debug
  • &$frmObj
setAsCurrent (line 410)

sets the page as current page by setting projects myPageObj

  • since: pk-07-08-15
boolean setAsCurrent (boolean $debug)
  • boolean $debug
setDefaults (line 577)

sets the default values form the default form

  • since: pk-05-01-20
void setDefaults ([bool $debug = False])
  • bool $debug

Redefinition of:
DBMS_TABLEOBJ::setDefaults()
sets the database default values to the fields
setId (line 358)

sets the page id

  • since: pk-03-12-17
void setId (int $aId)
  • int $aId
setTemplateId (line 854)

sets the template id

  • since: pk-05-11-09
void setTemplateId ( $ptmpId, int $ptmplId)
  • int $ptmplId
  • $ptmpId

Inherited Methods

Inherited From CMS_PAGE

 CMS_PAGE::CMS_PAGE()
 CMS_PAGE::checkDb()
 CMS_PAGE::getChapter()
 CMS_PAGE::getChaTemplates()
 CMS_PAGE::getClassName()
 CMS_PAGE::getCSSHeaderTag()
 CMS_PAGE::getDBField()
 CMS_PAGE::getDBRow()
 CMS_PAGE::getFeeter()
 CMS_PAGE::getFeeterTag()
 CMS_PAGE::getForm()
 CMS_PAGE::getFormDateFromPost()
 CMS_PAGE::getHead()
 CMS_PAGE::getHeadlineTag()
 CMS_PAGE::getId()
 CMS_PAGE::getJavaHeaderTag()
 CMS_PAGE::getMenuId()
 CMS_PAGE::getNextPage()
 CMS_PAGE::getObjVars()
 CMS_PAGE::getPreviousPage()
 CMS_PAGE::getStylesLink()
 CMS_PAGE::loadFromDB()
 CMS_PAGE::loadTemplate()
 CMS_PAGE::preview()
 CMS_PAGE::setArray()
 CMS_PAGE::setDB()
 CMS_PAGE::setDBField()
 CMS_PAGE::updateToDB()
 CMS_PAGE::view()
 CMS_PAGE::writeADMForm()

Inherited From CMS_TABLEOBJ

 CMS_TABLEOBJ::checkMenuNodeProject()
 CMS_TABLEOBJ::cmsCacheIsUsable()
 CMS_TABLEOBJ::factoryCurrentElements()
 CMS_TABLEOBJ::getCMSConf()
 CMS_TABLEOBJ::getCmsConfArr()
 CMS_TABLEOBJ::getLangId()
 CMS_TABLEOBJ::getMenId()
 CMS_TABLEOBJ::getMenLinkUrl()
 CMS_TABLEOBJ::getMenuIdColName()
 CMS_TABLEOBJ::getMenuIdGetName()
 CMS_TABLEOBJ::getMyMenuNode()
 CMS_TABLEOBJ::getMyPageObj()
 CMS_TABLEOBJ::getMyProject()
 CMS_TABLEOBJ::getNextMenuId()
 CMS_TABLEOBJ::getPageId()
 CMS_TABLEOBJ::getPageIdColName()
 CMS_TABLEOBJ::getPageIdGetName()
 CMS_TABLEOBJ::getPageSortColName()
 CMS_TABLEOBJ::getPageTable()
 CMS_TABLEOBJ::getPrevMenuId()
 CMS_TABLEOBJ::getProjId()
 CMS_TABLEOBJ::getProjIdColName()
 CMS_TABLEOBJ::getProjIdGetName()
 CMS_TABLEOBJ::get_currentMenu()
 CMS_TABLEOBJ::get_currentPage()
 CMS_TABLEOBJ::get_currentProj()
 CMS_TABLEOBJ::menuType_clearCache()
 CMS_TABLEOBJ::menuType_getClassSrc()
 CMS_TABLEOBJ::menuType_populate()
 CMS_TABLEOBJ::menuType_requireClass()
 CMS_TABLEOBJ::pageTmplType_getClassSrc()
 CMS_TABLEOBJ::pageTmplType_populate()
 CMS_TABLEOBJ::pageTmplType_requireClass()
 CMS_TABLEOBJ::pageType_getClassSrc()
 CMS_TABLEOBJ::pageType_getList()
 CMS_TABLEOBJ::pageType_getTmplClassName()
 CMS_TABLEOBJ::pageType_populate()
 CMS_TABLEOBJ::pageType_requireClass()
 CMS_TABLEOBJ::setCmsCacheArr()
 CMS_TABLEOBJ::setDBVal()
 CMS_TABLEOBJ::setLangId()
 CMS_TABLEOBJ::setMenId()
 CMS_TABLEOBJ::setMyMenuNode()
 CMS_TABLEOBJ::setMyPageObj()
 CMS_TABLEOBJ::setMyProject()
 CMS_TABLEOBJ::setPageId()
 CMS_TABLEOBJ::setProjId()
 CMS_TABLEOBJ::set_currentMenu()
 CMS_TABLEOBJ::set_currentPage()
 CMS_TABLEOBJ::set_currentProj()

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 44)

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:48 +0100 by phpDocumentor 1.4.0a2