Class CMS_CHAPTER

Description

Implements interfaces:

openCSP class CMS_CHAPTER

Located in /cms/chapter/CMS_CHAPTER.phpclass (line 37)

OCSP_OBJ
   |
   --DBMS_TABLEOBJ
      |
      --CMS_TABLEOBJ
         |
         --CMS_CHAPTER
Direct descendents
Class Description
 class CMS_CHAPTER_V2 Handels CMS Chapters
Class Constant Summary
 CLASS_SRC_FILE = __FILE__
Variable Summary
Method Summary
 static CMS_CHAPTER &factoryFromId (int $aId, [boolean $debug = False])
 static CMS_CHAPTER &getInstance (int $aId, [boolean $debug = False])
 static boolean isInstanced (int $aId)
 static void setInstance ( &$aChapter, NWL_CHAPTER $aLetter)
 void curUserCanEdit ([ $debug = False])
 boolean curUserCanShow ([boolean $debug = False])
 int dbInsert ([boolean $debug = False])
 boolean dbReplace ([boolean $debug = False], [boolean $ignorPopulated = False])
 OCSP_FORM &getForm ([int $mode = FRM_MODE_READONLY], [mixed $form = ''], [ $frmClass = 'CMS_CHAPTER_FORM'], [boolean $debug = FALSE])
 int getId ()
 TMPL_CHAPTER getMyTemplate ([boolean $debug = False])
 int getOrderNr ()
 int getTemplateId ()
 boolean isOnline ([boolean $debug = False])
 string render ([boolean $debug = False])
 void setMyTemplate ( &$aTemplate, TMPL_CHPATER $aTemplate)
 void setOrderNr (int $aOrderNr)
 void sort_check ( $debug)
 void sort_move (int $moveDir, int $movePos, [boolean $debug = False])
Variables
Methods
static factoryFromId (line 148)

factories a chapter object

  • todo: add chapter types
  • access: public
CMS_CHAPTER &factoryFromId (int $aId, [boolean $debug = False])
  • int $aId
  • boolean $debug

Redefined in descendants as:
static getInstance (line 72)

uses self::$loadedChapters as unit of work and returns the chapter with $aId

  • access: public
CMS_CHAPTER &getInstance (int $aId, [boolean $debug = False])
  • int $aId
  • boolean $debug
static isInstanced (line 90)

returns if we already have an instance of $aId

  • access: public
boolean isInstanced (int $aId)
  • int $aId
static setInstance (line 104)

adds a newsletter to the unit of work

  • access: public
void setInstance ( &$aChapter, NWL_CHAPTER $aLetter)
  • NWL_CHAPTER $aLetter
  • &$aChapter
curUserCanEdit (line 473)
  • access: public
void curUserCanEdit ([ $debug = False])
  • $debug
curUserCanShow (line 457)

returns if a user can show the chapter

NOTE does not check if the chapter is online

  • todo: allow editors to ?
  • access: public
boolean curUserCanShow ([boolean $debug = False])
  • boolean $debug
dbInsert (line 212)

inserts a new row to the table

  • return: returns the autoIncFld ID if exists or True on success
  • access: public
int dbInsert ([boolean $debug = False])
  • boolean $debug: show debug info

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

Redefined in descendants as:
dbReplace (line 255)

replaces a row in the table

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

  • access: public
boolean 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

Redefined in descendants as:
getForm (line 550)

replaces dbGetForm and returns a OCSP_FORM

  • todo: $frmClass require check
  • since: pk-08-01-14
  • requires: CMS_CHAPTER_FORM.phpclass
  • access: public
OCSP_FORM &getForm ([int $mode = FRM_MODE_READONLY], [mixed $form = ''], [ $frmClass = 'CMS_CHAPTER_FORM'], [boolean $debug = FALSE])
  • int $mode
  • mixed $form: (string) form name (int) form id
  • boolean $debug
  • $frmClass

Redefinition of:
DBMS_TABLEOBJ::getForm()
replaces dbGetForm and returns a OCSP_FORM
getId (line 166)
  • access: public
int getId ()
getMyTemplate (line 512)

returns the chapter template

  • access: public
TMPL_CHAPTER getMyTemplate ([boolean $debug = False])
  • boolean $debug
getOrderNr (line 175)

returns the order number

  • access: public
int getOrderNr ()
getState (line 195)

returns the chapter state object

  • access: public
CMS_CHAPTER_STATE &getState ()

Redefined in descendants as:
getTemplateId (line 501)

returns the chapter template id

  • access: public
int getTemplateId ()
isOnline (line 396)

returns if the template is online

  • check state
  • check show dates

  • access: public
boolean isOnline ([boolean $debug = False])
  • boolean $debug
render (line 600)

renders the html content of the chapter

  • return: (html)
  • access: public
string render ([boolean $debug = False])
  • boolean $debug
setMyTemplate (line 529)

sets the template object AND column CTMP_ID

  • access: public
void setMyTemplate ( &$aTemplate, TMPL_CHPATER $aTemplate)
  • TMPL_CHPATER $aTemplate
  • &$aTemplate
setOrderNr (line 185)

sets the sort order number

  • access: public
void setOrderNr (int $aOrderNr)
  • int $aOrderNr
sort_check (line 277)
  • access: public
void sort_check ( $debug)
  • $debug
sort_move (line 305)

moves the chapter (sortorder)

NOTE this method does save other chapters but not itself

  • since: pk-08-12-17
  • access: public
void sort_move (int $moveDir, int $movePos, [boolean $debug = False])
  • int $moveDir: (-1 down +1 up, 0 pos)
  • int $movePos
  • boolean $debug

Inherited Methods

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

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