Class TMPL_CHAPTER

Description

Implements interfaces:

openCSP class TMPL_CHAPTER

Located in /cms/template/chapter/TMPL_CHAPTER.phpclass (line 47)

OCSP_OBJ
   |
   --DBMS_TABLEOBJ
      |
      --TMPL_CHAPTER
Class Constant Summary
 CLASS_SRC_FILE = __FILE__
Variable Summary
Method Summary
 static TMPL_CHAPTER factoryFromId (int $aId)
 static TMPL_CHAPTER factoryFromRow (array $row)
 static TMPL_CHAPTER &getInstance (int $aId, [ $debug = False])
 static boolean isInstanced (int $aId)
 static void setInstance ( &$aChapter, CMS_CHAPTER $aChapter)
 void addInputFieldsToForm ( &$aForm, [boolean $debug = False], CMS_CHAPTER_FORM $aForm)
 int dbInsert ([boolean $debug = False])
 boolean dbReplace ([boolean $debug = False], [boolean $ignorPopulated = False])
 void deleteTmplField (string $fldKey, [debug $debug = False])
 void extractTmplFields ([boolean $debug = False])
 CMS_CHAPTER &getChaObjFromRow (array $aRow, [boolean $debug = False])
 OCSP_FORM &getChapterForm ([mixed $form = ''], [ $frmClass = 'CMS_CHAPTER_FORM'], [boolean $debug = False])
 CMS_CHAPTER &getChapterInstance (int $aId, [boolean $debug = False])
 string getConttable ()
 string getHTMLCode ()
 int getId ()
 string getModuleKey ()
 string getName ()
 CMS_PAGE_TEMPLATE &getPageTemplate ([ $debug = False])
 DBMS_FIELD &getTmplField (string $fldKey, [debug $debug = False])
 array getTmplFields ([boolean $debug = False])
 boolean isSeperator ()
 void moveTmplField (string $fldKey, int $toPos, [boolean $debug = False])
 void populateTmplFields ([boolean $debug = False])
 string renderToHtml (array $values, [boolean $debug = False])
 boolean saveTmplField (string $fldKey,  &$fld, [boolean $debug = False], DBMS_FIELD $fld)
 void saveTmplFields ([boolean $debug = False])
 void setConttable (string $aTable)
 void setPageTemplate ( &$aTemplate, CMS_PAGE_TEMPLATE $aTemplate)
 void setPageTemplateId (int $aId)
 void tmplFieldsHasChanged ([boolean $populate = False], [boolean $debug = False])
Variables
static mixed $loadedCMSChapterTmpls = array() (line 69)

unit of work

  • staticvar: array $loadedCMSChapterTmpls:
  • access: protected
string $contTable = "T_CMS_CHAPTER" (line 165)
  • var: the table holding the content
  • access: protected
string $myTable = "T_CMS_TMPL_CHAPTER" (line 160)

the database table

  • access: protected

Redefinition of:
DBMS_TABLEOBJ::$myTable
NOT FINAL !!!!!
array $myTmplFields = array() (line 144)

array of template form fields

  • access: protected
timestamp $myTmplFieldsPopulateTS = 0 (line 151)

temlate form fields populate timestamp

  • access: protected
string $myTmplFieldsTable = "T_CMS_TMPL_CHAPTER_FIELDS" (line 137)

table of the input fields

  • access: protected

Inherited Variables

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 factoryFromId (line 178)

factories a new TMPL_CHAPTER object

  • access: public
TMPL_CHAPTER factoryFromId (int $aId)
  • int $aId

Implementation of:
INFA_TMPL_CHAPTER::factoryFromId()
factories a new NWL_TMPL_CHAPTER object
static factoryFromRow (line 192)

returns a new newsletter from a db row

  • access: public
TMPL_CHAPTER factoryFromRow (array $row)
  • array $row
static getInstance (line 80)

returns an instance of the unit of work

  • access: public
TMPL_CHAPTER &getInstance (int $aId, [ $debug = False])
  • int $aId
  • $debug

Implementation of:
INFA_TMPL_CHAPTER::getInstance()
returns an instance of the unit of work
static isInstanced (line 101)

returns if we already have an instance of $aId

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

adds a newsletter to the unit of work

  • access: public
void setInstance ( &$aChapter, CMS_CHAPTER $aChapter)
addInputFieldsToForm (line 820)

adds the template input fields to $aForm

  • access: public
void addInputFieldsToForm ( &$aForm, [boolean $debug = False], CMS_CHAPTER_FORM $aForm)
dbInsert (line 291)

inserts a new row to the table

  • return: returns the autoIncFld ID if exists or 1 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
dbReplace (line 318)

replaces a row in the table

  • 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
deleteTmplField (line 714)

deletes a template field

note: if the field is still used in the template it will be added again when the fields are extracted

  • access: public
void deleteTmplField (string $fldKey, [debug $debug = False])
  • string $fldKey
  • debug $debug
extractTmplFields (line 466)

extracts the input fields from the te

  • access: protected
void extractTmplFields ([boolean $debug = False])
  • boolean $debug
getChaObjFromRow (line 804)

returns a chapter object from a T_CMS_CHAPTER row

  • access: public
CMS_CHAPTER &getChaObjFromRow (array $aRow, [boolean $debug = False])
  • array $aRow
  • boolean $debug
getChapterForm (line 847)

returns the chapter input form

  • access: public
OCSP_FORM &getChapterForm ([mixed $form = ''], [ $frmClass = 'CMS_CHAPTER_FORM'], [boolean $debug = False])
  • mixed $form: (string) form name (int) form id
  • boolean $debug
  • $frmClass
getChapterInstance (line 772)

get's a chapter instance

  • access: public
CMS_CHAPTER &getChapterInstance (int $aId, [boolean $debug = False])
  • int $aId
  • boolean $debug
getConttable (line 274)

returns the content table (name)

  • since: pk-05-10-10
  • access: public
string getConttable ()
getHTMLCode (line 228)

returns the html template

  • access: public
string getHTMLCode ()
getId (line 208)

returns the template id

  • access: public
int getId ()

Implementation of:
INFA_TMPL_CHAPTER::getId()
returns the id
getModuleKey (line 248)

(abstract) returns 'OCSP'

  • access: public
string getModuleKey ()
getName (line 218)

returns the template name

  • access: public
string getName ()
getNewChapter (line 757)

returns a new not populated chapter

  • access: public
CMS_CHAPTER &getNewChapter ()
getPageTemplate (line 365)

returns the page template

  • access: public
CMS_PAGE_TEMPLATE &getPageTemplate ([ $debug = False])
  • $debug
getPageTemplateId (line 344)

returns the page template id

  • access: public
int getPageTemplateId ()
getTmplField (line 634)

returns the template field object

  • access: public
DBMS_FIELD &getTmplField (string $fldKey, [debug $debug = False])
  • string $fldKey
  • debug $debug
getTmplFields (line 611)

returns an array with the template fields

  • access: public
array getTmplFields ([boolean $debug = False])
  • boolean $debug
isSeperator (line 238)

returns if the template is a seperator (no fields)

  • access: public
boolean isSeperator ()
moveTmplField (line 659)

moves a template field to $intPos

  • access: public
void moveTmplField (string $fldKey, int $toPos, [boolean $debug = False])
  • string $fldKey
  • int $toPos
  • boolean $debug
populateTmplFields (line 419)

populates the input fields from the database

  • requires: OCSP_FORM
  • access: protected
void populateTmplFields ([boolean $debug = False])
  • boolean $debug
renderToHtml (line 893)

renders the template to html

  • return: (html)
  • access: public
string renderToHtml (array $values, [boolean $debug = False])
  • array $values
  • boolean $debug
saveTmplField (line 542)

saves one template field to the db

  • access: public
boolean saveTmplField (string $fldKey,  &$fld, [boolean $debug = False], DBMS_FIELD $fld)
  • string $fldKey
  • DBMS_FIELD $fld
  • boolean $debug
  • &$fld
saveTmplFields (line 579)

saves the template fields to the db

  • todo: inline SQL
  • access: public
void saveTmplFields ([boolean $debug = False])
  • boolean $debug
setConttable (line 261)

sets the content table (name)

  • since: pk-05-10-10
  • access: public
void setConttable (string $aTable)
  • string $aTable: name of the content table
setPageTemplate (line 377)

sets the page template

  • access: public
void setPageTemplate ( &$aTemplate, CMS_PAGE_TEMPLATE $aTemplate)
setPageTemplateId (line 354)

sets the page template id

  • access: public
void setPageTemplateId (int $aId)
  • int $aId
tmplFieldsArePopulated (line 391)

returns if the template fields are populated

  • access: public
boolean tmplFieldsArePopulated ()
tmplFieldsHasChanged (line 402)

resets $this->myTmplFieldsPopulateTS and repopulates it if $populate

  • access: public
void tmplFieldsHasChanged ([boolean $populate = False], [boolean $debug = False])
  • boolean $populate
  • boolean $debug

Inherited Methods

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

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