Class TMPL_CHAPTER

Description

Handels chapter templates

  • author: Peter Krebs <p.krebs@lvus.at>
  • version: pk-03-10-21
  • copyright: (c) 2002-2003 by Peter Krebs and Landesverlag Unternehmensservice
  • project: Open CSP-Management
  • license: GNU Public License

Located in /cms/template/TMPL_CHAPTER.phpclass (line 35)

OCSP_OBJ
   |
   --DBMS_TABLEOBJ
      |
      --CMS_TABLEOBJ
         |
         --TMPL_CHAPTER
Direct descendents
Class Description
 class TMPL_CHAPTER_V3 Handels chapter templates
Variable Summary
Method Summary
 TMPL_CHAPTER TMPL_CHAPTER ([int $projId = 0], [int $ptmpId = 0], [int $aId = 0], [bool $issep = FALSE], [int $langId = 0], [ $gDBIDX = "USRDB"])
 DBMS_FORM &dbGetForm (int $mode, [string $frmName = ""], [boolean $debug = FALSE])
 int dbInsert ([string $gDBIDX = "USRDB"], [bool $debug = FALSE])
 bool dbReplace ([string $gDBIDX = "USRDB"], [bool $debug = FALSE])
 void dbSave ([string $gDBIDX = "USRDB"], [bool $debug = FALSE])
 void deleteField ( $fldName, [ $debug = FALSE])
 string fldLstRow ( &$fld, [string $editUrl = ""], [ $funcUrl = ""], [string $tdStyle = ""], [boolean $debug = FALSE], DBMS_FIELD $fld)
 string fldLstRow_Header ( $debug)
 DBMS_FORM &getChapterForm ([string $aForm = ""], [boolean $debug = FALSE], [boolean $inputFieldsOnly = FALSE])
 void getFieldList ([boolean $debug = FALSE])
 string getFieldValues (array $postArr, [boolean $keepServerName = FALSE], [boolean $debug = FALSE], [array $fldArr = NULL])
 int getId ()
 void getPTMPId ()
 void getTag ([array $vals = array()], [string $var = "HTMLCODE"], [boolean $debug = FALSE])
 void p_checkSort ([boolean $debug = FALSE])
 bool p_extractFields ([bool $clearFirst = FALSE], [bool $debug = FALSE])
 void setDBFieldDataCols ([boolean $debug = FALSE])
 void setDBRow (array $row, [bool $asPopulated = TRUE], [bool $debug = FALSE])
 boolean setFieldDBType (string $fldName, string $dbType, [ $autoSave = TRUE], [boolean $debug = FALSE], boolean $autosave)
 void setId (int $aId)
 void setPOSTVAL ([string $arrName = "DBVAL"], [bool $debug = FALSE])
 void setPTMPId (int $aId)
 void storeFields ([ $debug = FALSE])
Variables
mixed $colPrevix = "CTMP_" (line 47)
  • staticvar: string $colPrevix: the column name for the chapter columns

Redefined in descendants as:
mixed $contTable = "T_CMS_CHAPTER" (line 51)
  • staticvar: string $contTable: the table holding the content
array $inputFields = array() (line 60)
  • var: array of DBMS_FIELD objects for the input form

Redefined in descendants as:
string $myClassSrcFile = __FILE__ (line 71)
  • var: source file of the class
  • since: pk-05-02-02

Redefined in descendants as:
array $myFldValTypes = array('string'=>'String','int'=>'Integer','float'=>'Number','blob'=>'Text') (line 77)
  • var: array of allowed db types
  • since: pk-05-02-02

Redefined in descendants as:
string $myFrmFldTableName = "CHAPTER" (line 65)
  • var: (table name set in dbms_formfields)

Redefined in descendants as:
mixed $myTable = "T_CMS_TMPL_CHAPTER" (line 39)
  • staticvar: string $myTable:

Redefinition of:
DBMS_TABLEOBJ::$myTable
NOT FINAL !!!!!
mixed $ptmplFld = "PTMP_ID" (line 43)
  • staticvar: string $ptmplFld: the column name for the page template foreign key

Redefined in descendants as:
array $tmplFields = array("CTMP_HTMLCODE") (line 56)
  • var: db columns with template code to extract

Inherited Variables

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 TMPL_CHAPTER (line 90)

creates and inits and populates if all keys are set the object

  • version: pk-05-02-02
TMPL_CHAPTER TMPL_CHAPTER ([int $projId = 0], [int $ptmpId = 0], [int $aId = 0], [bool $issep = FALSE], [int $langId = 0], [ $gDBIDX = "USRDB"])
  • int $projId: ID of the project - db foreign key
  • int $ptmpId: ID of the Page Template - db foreign key
  • int $aId: ID of the db COLUMN
  • bool $issep: is the chapter a layout element with no input
  • int $langId: language Id
  • $gDBIDX
dbGetForm (line 169)

returns a database form and hides some system fields

  • since: pk-05-03-20
DBMS_FORM &dbGetForm (int $mode, [string $frmName = ""], [boolean $debug = FALSE])
  • int $mode
  • string $frmName
  • boolean $debug

Redefinition of:
DBMS_TABLEOBJ::dbGetForm()
returns a database form

Redefined in descendants as:
dbInsert (line 302)

inserts a new row to the table

we have to serialize the inputFields before saving

  • return: returns the autoIncFld ID if exists or 1 on success
int dbInsert ([string $gDBIDX = "USRDB"], [bool $debug = FALSE])
  • string $gDBIDX: Index of $GLOBALS to the db object
  • bool $debug: show debug info

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

replaces a row in the table

serialize $this->inputFields and calls parent::dbReplace()

bool dbReplace ([string $gDBIDX = "USRDB"], [bool $debug = FALSE])
  • string $gDBIDX: Index of $GLOBALS to the db object
  • bool $debug: show debug info

Redefinition of:
DBMS_TABLEOBJ::dbReplace()
replaces a row in the table
dbSave (line 281)

saves the object to the database

if getId() dbReplace is called else dbInsert is called

  • version: pk-03-10-19
void dbSave ([string $gDBIDX = "USRDB"], [bool $debug = FALSE])
  • string $gDBIDX: Index of $GLOBALS to the db object
  • bool $debug: show debug info

Redefinition of:
DBMS_TABLEOBJ::dbSave()
save the Object if $this->autoIncFld is not empty
deleteField (line 607)
void deleteField ( $fldName, [ $debug = FALSE])
  • $fldName
  • $debug

Redefined in descendants as:
fldLstRow (line 366)

returns the htmlcode for a field row in the fieldlist

  • since: pk-05-02-02
string fldLstRow ( &$fld, [string $editUrl = ""], [ $funcUrl = ""], [string $tdStyle = ""], [boolean $debug = FALSE], DBMS_FIELD $fld)
  • DBMS_FIELD $fld: the field object
  • string $editUrl: link to the field editor
  • string $tdStyle: column stylesheet (add ; at the end)
  • boolean $debug
  • &$fld
  • $funcUrl

Redefined in descendants as:
fldLstRow_Header (line 337)

returns the table head row for the fieldlist

  • since: pk-05-02-02
string fldLstRow_Header ( $debug)
  • $debug

Redefined in descendants as:
getChapterForm (line 666)

returns the form object for the chapter

  • version: pk-04-07-30
DBMS_FORM &getChapterForm ([string $aForm = ""], [boolean $debug = FALSE], [boolean $inputFieldsOnly = FALSE])
  • string $aForm: Name of a DMBS_FORM if empty TABLENAME is used
  • boolean $inputFieldsOnly: hide all other fields
  • boolean $debug
getFieldList (line 626)

returns an array with pointers to the template fields

void getFieldList ([boolean $debug = FALSE])
  • boolean $debug

Redefined in descendants as:
getFieldValues (line 710)

returns a serialized array of the input fields in $postArr

if $fldArr is an array the fields are added/replaced otherwise a new array is created

  • version: pk-04-08-05
string getFieldValues (array $postArr, [boolean $keepServerName = FALSE], [boolean $debug = FALSE], [array $fldArr = NULL])
  • array $postArr
  • boolean $keepServerName: (replace http://SERVER_NAME/ with / ?)
  • boolean $debug
  • array $fldArr

Redefined in descendants as:
getId (line 115)

returns the db ID-column value

  • version: pk-03-10-19
int getId ()

Redefined in descendants as:
getPTMPId (line 140)

returns the page template id

  • version: pk-03-10-24
void getPTMPId ()

Redefined in descendants as:
getTag (line 753)

returns the html code for the template

  • version: pk-04-11-15
  • since: pk-04-07-30
void getTag ([array $vals = array()], [string $var = "HTMLCODE"], [boolean $debug = FALSE])
  • array $vals
  • string $var
  • boolean $debug

Redefined in descendants as:
p_checkSort (line 460)

checks the sortorder of the input fields

  • version: pk-05-03-21
void p_checkSort ([boolean $debug = FALSE])
  • boolean $debug

Redefined in descendants as:
p_extractFields (line 514)

PRIVATE extracts template fields from code fields

  • version: pk-05-02-08
  • private:
bool p_extractFields ([bool $clearFirst = FALSE], [bool $debug = FALSE])
  • bool $clearFirst: call $this->inputFields =array(); ?
  • bool $debug: show debug info

Redefined in descendants as:
setDBFieldDataCols (line 189)

sets the objects field data vars FIELD,FIELDCLASSES

  • since: pk-05-03-21
void setDBFieldDataCols ([boolean $debug = FALSE])
  • boolean $debug
setDBRow (line 221)

sets a database row to the object fields and extract fields from

sets each key (=columname) value

  • version: pk-03-12-14
  • version: pk-05-03-21
  • since: pk-03-12-14
void setDBRow (array $row, [bool $asPopulated = TRUE], [bool $debug = FALSE])
  • array $row: the row form a select * from DBMS_TABLEOBJ::myTable
  • bool $asPopulated: set populateTS as if the object has been populated
  • bool $debug

Redefinition of:
DBMS_TABLEOBJ::setDBRow()
sets a database row to the object fields
setFieldDBType (line 595)

sets the db datatype of a field

  • since: pk-05-03-21
boolean setFieldDBType (string $fldName, string $dbType, [ $autoSave = TRUE], [boolean $debug = FALSE], boolean $autosave)
  • string $fldName: Name of the field
  • string $dbType: Name of the DB col type
  • boolean $autosave: save object after change
  • boolean $debug
  • $autoSave
setId (line 128)

sets the db ID-column value

  • version: pk-03-12-14
  • since: pk-03-12-14
void setId (int $aId)
  • int $aId

Redefined in descendants as:
setPOSTVAL (line 256)

sets the object field from $_POST[$arrName] and extracts fields

note populates the template first to get all fields.

  • version: pk-03-12-14 as DBMS_TBLOBJ::setPOSTVAL() calls setDBRow no more need to overwrite
void setPOSTVAL ([string $arrName = "DBVAL"], [bool $debug = FALSE])
  • string $arrName: name of the post array
  • bool $debug: show debug info
setPTMPId (line 153)

sets the page template id

  • version: pk-03-12-14
  • since: pk-03-12-14
void setPTMPId (int $aId)
  • int $aId

Redefined in descendants as:
storeFields (line 647)
void storeFields ([ $debug = FALSE])
  • $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

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