Class TMPL_CHAPTER_V3

Description

Handels chapter templates

  • author: Peter Krebs <pitlinz@users.sourceforge.net>
  • version: pk-06-03-08
  • version: pk-06-02-16 pageTmpl methods added
  • version: pk-05-08-30
  • version: pk-07-05-31
  • version: pk-07-08-22
  • version: $Id: TMPL_CHAPTER_V3.phpclass,v 1.16 2008/10/18 12:18:39 pitlinz Exp $
  • copyright: (c) 2002-2003 by Peter Krebs and Landesverlag Unternehmensservice
  • deprecated: since pk-08-08-07
  • since: pk-05-07-20
  • project: Open CSP-Management
  • license: GNU Public License

Located in /cms/template/chapter/TMPL_CHAPTER_V3.phpclass (line 45)

OCSP_OBJ
   |
   --DBMS_TABLEOBJ
      |
      --CMS_TABLEOBJ
         |
         --TMPL_CHAPTER
            |
            --TMPL_CHAPTER_V3
Class Constant Summary
 CLASS_SRC_FILE = __FILE__
Variable Summary
Method Summary
 static TMPL_CHAPTER_V3 TMPL_CHAPTER_FROM_ID (int $aId, [boolean $debug = FALSE])
 TMPL_CHAPTER_V3 TMPL_CHAPTER_V3 ([int $aId = 0], [boolen $issep = FALSE], [boolean $debug = FALSE])
 DBMS_FORM &dbGetForm (int $mode, [string $frmName = ""], [boolean $debug = FALSE])
 boolean deleteField (string $fldName, [boolean $debug = FALSE], [boolean $forceDB = TRUE])
 boolean fldDoTmplFldCmd ([string $fldCmd = ""], [boolean $debug = FALSE])
 string fldLstRow ( &$fld, [string $editUrl = ""], [ $funcUrl = ""], [string $tdStyle = ""], [boolean $debug = FALSE], DBMS_FIELD $fld)
 string fldLstRow_Header ( $debug)
 array getFieldList ([boolean $debug = FALSE], [boolean $autoSave = TRUE])
 string getFieldValues (array $postArr, [boolean $keepServerName = FALSE], [boolean $debug = FALSE], [array $fldArr = NULL])
 OCSP_FORM &getForm ([int $mode = FRM_MODE_READONLY], [mixed $form = ''], [ $frmClass = 'OCSP_FORM'], [boolean $debug = FALSE])
 int getId ()
 string getPreviewAppend ()
 string getPreviewPrepend ()
 string getPTMPColName ()
 int getPTMPId ([ $debug = FALSE])
 void getTag ([array $vals = array()], [string $var = "HTMLCODE"], [boolean $debug = FALSE], [boolean $wysiwygPreView = FALSE])
 boolean loadPageTemplate ([boolean $debug = FALSE], boolean $enableEmpty)
 int populateInputFields ([boolean $extractFlds = TRUE], [boolean $debug = FALSE], [boolean $autoUpdate = TRUE], string $gDBIDX)
 void p_checkSort ([boolean $debug = FALSE])
 bool p_extractFields ([bool $clearFirst = FALSE], [bool $debug = FALSE])
 void setId (int $aId)
 void setPTMPId (int $aId, [boolean $debug = FALSE])
 void unserFldRow (string $key, array $fldDesc, [bool $debug = FALSE])
Variables
mixed $colPrevix = "CTMP_" (line 78)
  • staticvar: string $colPrevix: the column name for the chapter columns
  • access: protected

Redefinition of:
TMPL_CHAPTER::$colPrevix
array $inputFields = array() (line 84)
  • var: array of DBMS_FIELD objects for the input form
  • access: protected

Redefinition of:
TMPL_CHAPTER::$inputFields
string $myClassSrcFile = __FILE__ (line 95)
  • var: source file of the class
  • since: pk-05-02-02
  • access: protected

Redefinition of:
TMPL_CHAPTER::$myClassSrcFile
OCSP_FORM $myFldFormObj = Null (line 106)
  • var: (dummy) formObject for the fields
  • access: protected
array $myFldValTypes = array('string'=>'String','int'=>'Integer','float'=>'Number','blob'=>'Text') (line 101)
  • var: array of allowed db types
  • since: pk-05-02-02
  • access: protected

Redefinition of:
TMPL_CHAPTER::$myFldValTypes
string $myFrmFldTableName = "CHAPTER" (line 89)
  • var: (table name set in dbms_formfields)
  • access: protected

Redefinition of:
TMPL_CHAPTER::$myFrmFldTableName
string $myPageTmpl = NULL (line 72)
  • since: pk-06-02-16
  • access: protected
mixed $ptmplClass = "CMS_PAGE_TEMPLATE" (line 67)
  • staticvar: string $ptmplClass:
  • since: pk-06-02-16
  • access: protected
mixed $ptmplFld = "PTMP_ID" (line 56)
  • staticvar: string $ptmplFld: the column name for the page template foreign key
  • access: protected

Redefinition of:
TMPL_CHAPTER::$ptmplFld
mixed $ptmplTable = "T_CMS_TMPL_PAGE" (line 62)
  • staticvar: string $ptmplTable:
  • since: pk-06-02-16
  • access: protected

Inherited Variables

Inherited from TMPL_CHAPTER

TMPL_CHAPTER::$contTable
TMPL_CHAPTER::$myTable
TMPL_CHAPTER::$tmplFields

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 TMPL_CHAPTER_FROM_ID (line 145)

returns a chapter template object from an id

  • since: pk-08-01-15
  • access: public
TMPL_CHAPTER_V3 TMPL_CHAPTER_FROM_ID (int $aId, [boolean $debug = FALSE])
  • int $aId
  • boolean $debug
Constructor TMPL_CHAPTER_V3 (line 122)

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

  • version: pk-07-08-22
TMPL_CHAPTER_V3 TMPL_CHAPTER_V3 ([int $aId = 0], [boolen $issep = FALSE], [boolean $debug = FALSE])
  • int $aId: ID of the db COLUMN
  • boolen $issep: is the chapter a layout element with no input
  • boolean $debug
dbGetForm (line 187)

returns a database form and hides some system fields also sets CTMP_ALLOWED_SHOWMODE to

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

Redefinition of:
TMPL_CHAPTER::dbGetForm()
returns a database form and hides some system fields
deleteField (line 896)

deletes a field

  • version: pk-05-07-29
boolean deleteField (string $fldName, [boolean $debug = FALSE], [boolean $forceDB = TRUE])
  • string $fldName
  • boolean $debug
  • boolean $forceDB

Redefinition of:
TMPL_CHAPTER::deleteField()
fldDoTmplFldCmd (line 634)

checks the field command ($_GET['TMPLFLDCMD'] if $fldCmd is empty) and do the required action

boolean fldDoTmplFldCmd ([string $fldCmd = ""], [boolean $debug = FALSE])
  • string $fldCmd
  • boolean $debug
fldLstRow (line 532)

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

Redefinition of:
TMPL_CHAPTER::fldLstRow()
returns the htmlcode for a field row in the fieldlist
fldLstRow_Header (line 503)

returns the table head row for the fieldlist

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

Redefinition of:
TMPL_CHAPTER::fldLstRow_Header()
returns the table head row for the fieldlist
getFieldList (line 928)

returns an array with pointers to the template fields also checks orderNr

  • version: pk-05-07-25
  • version: pk-06-12-01
  • version: pk-08-01-15
array getFieldList ([boolean $debug = FALSE], [boolean $autoSave = TRUE])
  • boolean $debug
  • boolean $autoSave

Redefinition of:
TMPL_CHAPTER::getFieldList()
returns an array with pointers to the template fields
getFieldValues (line 1022)

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

Redefinition of:
TMPL_CHAPTER::getFieldValues()
returns a serialized array of the input fields in $postArr
getForm (line 235)

replaces dbGetForm and returns a OCSP_FORM

  • return: __OCSP_PHPINCPATH__
  • since: pk-07-08-16
  • requires: db/forms/OCSP_FORM.phpclass
OCSP_FORM &getForm ([int $mode = FRM_MODE_READONLY], [mixed $form = ''], [ $frmClass = 'OCSP_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 153)
int getId ()

Redefinition of:
TMPL_CHAPTER::getId()
returns the db ID-column value
getPreviewAppend (line 1179)
  • since: pk-05-09-01
string getPreviewAppend ()
getPreviewPrepend (line 1171)
  • since: pk-05-09-01
string getPreviewPrepend ()
getPTMPColName (line 399)
  • since: pk-05-08-29
string getPTMPColName ()
getPTMPId (line 407)

returns the page template id

int getPTMPId ([ $debug = FALSE])
  • $debug

Redefinition of:
TMPL_CHAPTER::getPTMPId()
returns the page template id
getTag (line 1068)

returns the html code for the template

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

Redefinition of:
TMPL_CHAPTER::getTag()
returns the html code for the template
loadPageTemplate (line 448)

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

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

  • return: succeed ?
  • since: pk-06-02-16
boolean loadPageTemplate ([boolean $debug = FALSE], boolean $enableEmpty)
  • boolean $debug: show debug information
  • boolean $enableEmpty
populateInputFields (line 266)

clears $this->inputFields and populates it from the database returns the size of the input field array

  • version: pk-05-10-12
  • since: pk-05-08-02
int populateInputFields ([boolean $extractFlds = TRUE], [boolean $debug = FALSE], [boolean $autoUpdate = TRUE], string $gDBIDX)
  • boolean $extractFlds
  • boolean $debug
  • string $gDBIDX
  • boolean $autoUpdate: update to version 3 if not already is in this version
p_checkSort (line 731)

checks the sortOrder of the input fields

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

Redefinition of:
TMPL_CHAPTER::p_checkSort()
checks the sortorder of the input fields
p_extractFields (line 787)

PRIVATE extracts template fields from code fields

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

Redefinition of:
TMPL_CHAPTER::p_extractFields()
PRIVATE extracts template fields from code fields
setId (line 160)
void setId (int $aId)
  • int $aId

Redefinition of:
TMPL_CHAPTER::setId()
sets the db ID-column value
setPTMPId (line 423)

sets the page template id

  • version: pk-06-02-16
  • since: pk-03-12-14
void setPTMPId (int $aId, [boolean $debug = FALSE])
  • int $aId
  • boolean $debug

Redefinition of:
TMPL_CHAPTER::setPTMPId()
sets the page template id
unserFldRow (line 348)

unserializes a fieldRow (array element)

  • version: pk-05-12-01
  • since: pk-05-07-14
void unserFldRow (string $key, array $fldDesc, [bool $debug = FALSE])
  • string $key
  • array $fldDesc
  • bool $debug

Inherited Methods

Inherited From TMPL_CHAPTER

 TMPL_CHAPTER::TMPL_CHAPTER()
 TMPL_CHAPTER::dbGetForm()
 TMPL_CHAPTER::dbInsert()
 TMPL_CHAPTER::dbReplace()
 TMPL_CHAPTER::dbSave()
 TMPL_CHAPTER::deleteField()
 TMPL_CHAPTER::fldLstRow()
 TMPL_CHAPTER::fldLstRow_Header()
 TMPL_CHAPTER::getChapterForm()
 TMPL_CHAPTER::getFieldList()
 TMPL_CHAPTER::getFieldValues()
 TMPL_CHAPTER::getId()
 TMPL_CHAPTER::getPTMPId()
 TMPL_CHAPTER::getTag()
 TMPL_CHAPTER::p_checkSort()
 TMPL_CHAPTER::p_extractFields()
 TMPL_CHAPTER::setDBFieldDataCols()
 TMPL_CHAPTER::setDBRow()
 TMPL_CHAPTER::setFieldDBType()
 TMPL_CHAPTER::setId()
 TMPL_CHAPTER::setPOSTVAL()
 TMPL_CHAPTER::setPTMPId()
 TMPL_CHAPTER::storeFields()

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

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