Class CMS_CHAPTER_V2

Description

Handels CMS Chapters

Located in /cms/chapter/CMS_CHAPTER_V2.phpclass (line 40)

OCSP_OBJ
   |
   --DBMS_TABLEOBJ
      |
      --CMS_TABLEOBJ
         |
         --CMS_CHAPTER
            |
            --CMS_CHAPTER_V2
Class Constant Summary
 CLASS_SRC_FILE = __FILE__
Variable Summary
Method Summary
 static CMS_CHAPTER_V2 CMS_CHAPTER_FROM_ID (int $aId, [boolean $debug = FALSE])
 static CMS_CHAPTER_V2 factoryFromId (int $aId, [boolean $debug = False])
 CMS_CHAPTER_V2 CMS_CHAPTER_V2 ([int $aId = 0], [boolean $autoPopulate = TRUE], [boolean $debug = FALSE], string $gDBIDX)
 DBMS_FORM &dbGetForm ([int $mode = 0], [string $frmName = ""], [boolean $debug = FALSE])
 int dbInsert ([bool $debug = FALSE], string $gDBIDX)
 bool dbReplace ([bool $debug = FALSE], [boolean $ignorPopulated = FALSE])
 string getChapterTypeName ()
 int getPageTmplId ([boolean $debug = FALSE])
 int getShowMode ()
 int getSortOrder ()
 int getState ()
 string getTag ([ $tmplVals = NULL], [char $tmplVarSign = '$'], [boolean $wysiwygPreView = FALSE], [boolean $debug = FALSE], array $tmpldataArr)
 array getTemplateData ([boolean $fromFld = TRUE], [boolean $debug = FALSE])
 int getTmplId ()
 int populateObjVals ([bool $debug = FALSE])
 bool setFORMPOST ( &$frmObj,  $dbval, [bool $debug = FALSE], [int $frmMode = 0], DBMS_FORM $frmObj, array $dbVal)
 void setFromPageObj (CMS_PAGE $pagObj, [bool $debug = FALSE])
 void setId (int $aId)
 bool setPOSTVAL ([string $arrName = ""], [bool $debug = FALSE])
 void setState ([ $aState = 0], [ $autoSave = FALSE], [ $debug = FALSE])
 void setTemplateObj ( &$chatmpl, [boolean $debug = FALSE], TMPL_CHAPTER $chatmpl;)
 boolean setTemplateObjId (int $chaTmplId, [boolean $debug = FALSE])
 void setTmplId (int $tmplId)
 void sort_MoveDown ([boolean $debug = FALSE])
 int sort_MoveToPos (int $position, [boolean $debug = FALSE])
 void sort_MoveUp ([boolean $debug = FALSE])
 boolean userCan (int $mode, [boolean $debug = FALSE])
Variables
mixed $colPrevix = "CHA_" (line 77)
  • staticvar: string $colPrevix: the column name for the chapter columns
mixed $moduleKey = "CMS" (line 55)
  • staticvar: string $moduleKey:
  • since: pk-05-07-20
string $myClassSrcFile = __FILE__ (line 88)
  • var: source file of the class
mixed $myPageTmplCol = "PTMP_ID" (line 65)
  • staticvar: string $myPageTmplCol: the column name for the page template foreign key
mixed $mySrcVersion = "2" (line 83)
  • staticvar: int $mySrcVersion:
mixed $myTmplClass = "TMPL_CHAPTER_V3" (line 71)
  • staticvar: string $myTmplClass: make sure the class file is included if you overwrite this
mixed $myTmplCol = "CTMP_ID" (line 60)
  • staticvar: string $mytmplCol: the column name for the page template foreign key

Inherited Variables

Inherited from CMS_CHAPTER

CMS_CHAPTER::$loadedChapters
CMS_CHAPTER::$myTable
CMS_CHAPTER::$myTemplate

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
static CMS_CHAPTER_FROM_ID (line 146)

returns a the chapter object for chapter ID: $aId

  • since: pk-08-01-15
  • access: public
CMS_CHAPTER_V2 CMS_CHAPTER_FROM_ID (int $aId, [boolean $debug = FALSE])
  • int $aId
  • boolean $debug
static factoryFromId (line 101)

returns a the chapter object for chapter ID: $aId

  • since: pk-08-01-15
  • access: public
CMS_CHAPTER_V2 factoryFromId (int $aId, [boolean $debug = False])
  • int $aId
  • boolean $debug

Redefinition of:
CMS_CHAPTER::factoryFromId()
factories a chapter object
Constructor CMS_CHAPTER_V2 (line 126)

cunstructor

CMS_CHAPTER_V2 CMS_CHAPTER_V2 ([int $aId = 0], [boolean $autoPopulate = TRUE], [boolean $debug = FALSE], string $gDBIDX)
  • int $aId
  • string $gDBIDX
  • boolean $autoPopulate
  • boolean $debug
dbGetForm (line 430)

returns a chapter input form not a database form as we have chapter fields not represented in the db model

returns the form from the template

  • version: pk-06-02-17
DBMS_FORM &dbGetForm ([int $mode = 0], [string $frmName = ""], [boolean $debug = FALSE])
  • int $mode
  • string $frmName
  • boolean $debug

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

inserts a new row to the table and checks SORTORDER

  • return: returns the autoIncFld ID if exists or 1 on success
  • version: pk-05-08-26
  • version: pk-07-01-09
int dbInsert ([bool $debug = FALSE], string $gDBIDX)
  • string $gDBIDX: Index of $GLOBALS to the db object
  • bool $debug: show debug info

Redefinition of:
CMS_CHAPTER::dbInsert()
inserts a new row to the table
dbReplace (line 293)

replaces a row in the table

if the object has not been populated (!$this->populateTS) FALSE is returned

  • version: pk-07-01-09
bool dbReplace ([bool $debug = FALSE], [boolean $ignorPopulated = FALSE])
  • bool $debug: show debug info
  • boolean $ignorPopulated: (if false the table MUST have been populated)

Redefinition of:
CMS_CHAPTER::dbReplace()
replaces a row in the table
getChapterTypeName (line 170)

returns the class name of the object to store in the db overwrite in child classes

  • since: pk-07-01-09
string getChapterTypeName ()
getPageTmplId (line 382)

return the page template ID

int getPageTmplId ([boolean $debug = FALSE])
  • boolean $debug
getShowMode (line 177)
int getShowMode ()
getSortOrder (line 549)
int getSortOrder ()
getState (line 730)
int getState ()

Redefinition of:
CMS_CHAPTER::getState()
returns the chapter state object
getTag (line 846)

returns the parsed chapter

if $tmplVals is an array the return value is paresed with this -> you can use templates within the chapter value

string getTag ([ $tmplVals = NULL], [char $tmplVarSign = '$'], [boolean $wysiwygPreView = FALSE], [boolean $debug = FALSE], array $tmpldataArr)
  • array $tmpldataArr
  • char $tmplVarSign
  • boolean $wysiwygPreView
  • boolean $debug
  • $tmplVals
getTemplateData (line 803)

return the data array to use in the template

  • since: pk-05-08-26
array getTemplateData ([boolean $fromFld = TRUE], [boolean $debug = FALSE])
  • boolean $fromFld
  • boolean $debug
getTmplId (line 314)
int getTmplId ()
populateObjVals (line 201)

merges {$this->colPrevix."FIELDS"} with Object values

  • return: sizeof myObjVals
  • since: pk-05-08-26
int populateObjVals ([bool $debug = FALSE])
  • bool $debug

Redefinition of:
DBMS_TABLEOBJ::populateObjVals()
populates the Object values
setFORMPOST (line 516)

sets post array with form checks

bool setFORMPOST ( &$frmObj,  $dbval, [bool $debug = FALSE], [int $frmMode = 0], DBMS_FORM $frmObj, array $dbVal)
  • DBMS_FORM $frmObj: a formObj as ref
  • array $dbVal: array with data
  • bool $debug
  • int $frmMode
  • &$frmObj
  • $dbval
setFromPageObj (line 406)

sets page filds used to identify the object

void setFromPageObj (CMS_PAGE $pagObj, [bool $debug = FALSE])
setId (line 156)
void setId (int $aId)
  • int $aId
setPOSTVAL (line 482)

calls this::setFORMPOST() with this::dbGetForm() formular

bool setPOSTVAL ([string $arrName = ""], [bool $debug = FALSE])
  • string $arrName: name of the post array
  • bool $debug: show debug info
setState (line 750)
void setState ([ $aState = 0], [ $autoSave = FALSE], [ $debug = FALSE])
  • $aState
  • $autoSave
  • $debug
setTemplateObj (line 332)

sets the templateobject;

void setTemplateObj ( &$chatmpl, [boolean $debug = FALSE], TMPL_CHAPTER $chatmpl;)
setTemplateObjId (line 349)

sets the TemplateObject by ID

boolean setTemplateObjId (int $chaTmplId, [boolean $debug = FALSE])
  • int $chaTmplId
  • boolean $debug
setTmplId (line 321)
void setTmplId (int $tmplId)
  • int $tmplId
sort_MoveDown (line 603)

moves the chapter down (increase sortorder) note: autosaves sortorder

  • since: pk-05-08-03
void sort_MoveDown ([boolean $debug = FALSE])
  • boolean $debug
sort_MoveToPos (line 651)

moves the chapter to a position note: autosaves sortorder

if $postion > last postion the object will be moved to the end

  • since: pk-05-08-03
int sort_MoveToPos (int $position, [boolean $debug = FALSE])
  • int $position
  • boolean $debug
sort_MoveUp (line 564)

moves the chapter up (decrease sortorder) note autosaves sortorder

  • since: pk-05-08-03
void sort_MoveUp ([boolean $debug = FALSE])
  • boolean $debug
userCan (line 712)

checks if the user can edit the chapter

  • todo: CMS_CHAPTER_V2::userCan() state check, showgroup check
boolean userCan (int $mode, [boolean $debug = FALSE])
  • int $mode
  • boolean $debug

Inherited Methods

Inherited From CMS_CHAPTER

 CMS_CHAPTER::curUserCanEdit()
 CMS_CHAPTER::curUserCanShow()
 CMS_CHAPTER::dbInsert()
 CMS_CHAPTER::dbReplace()
 CMS_CHAPTER::factoryFromId()
 CMS_CHAPTER::getForm()
 CMS_CHAPTER::getId()
 CMS_CHAPTER::getInstance()
 CMS_CHAPTER::getMyTemplate()
 CMS_CHAPTER::getOrderNr()
 CMS_CHAPTER::getState()
 CMS_CHAPTER::getTemplateId()
 CMS_CHAPTER::isInstanced()
 CMS_CHAPTER::isOnline()
 CMS_CHAPTER::render()
 CMS_CHAPTER::setInstance()
 CMS_CHAPTER::setMyTemplate()
 CMS_CHAPTER::setOrderNr()
 CMS_CHAPTER::sort_check()
 CMS_CHAPTER::sort_move()

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

Inherited Constants

Inherited from CMS_CHAPTER

CMS_CHAPTER::CLASS_SRC_FILE

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