Class PRO_GROUP_NODE

Description

Class PRO_GROUP_NODE

  • author: Peter Krebs (pk) <p.krebs@wpus.at>
  • version: pk-04-01-02
  • version: pk-08-01-31
  • version: $Id: DBMS_TABLEOBJ.phpclass,v 1.60 2008/12/17 16:28:52 peterkrebs Exp $
  • version: pk-05-11-17
  • copyright: (c) 2002-2004 by Peter Krebs and Landesverlag Unternehmensservice
  • copyright: (c) 2005 by WURM & Partner Unternehmensservice GmbH
  • project: Open CSP-Management
  • since: pk-05-06-19
  • license: GNU Public License

Located in /products/PRO_GROUP_NODE.phpclass (line 33)

OCSP_OBJ
   |
   --DBMS_TABLEOBJ
      |
      --DBMS_TREE_NODE
         |
         --PRO_GROUP_NODE
Variable Summary
Method Summary
 int addChildNode ( &$aNode, [boolean $debug = FALSE], DBMS_TREE_NODE $aNode)
 int checkShowDate ([ $debug = FALSE])
 DBMS_FORM &dbGetForm (int $mode, [string $frmName = ""], [boolean $debug = FALSE])
 DBMS_FORM &dbGetProLstForm ([boolean $debug = FALSE], int $mode)
 int dbInsert ([string $gDBIDX = "USRDB"], [bool $debug = FALSE])
 bool dbReplace ([string $gDBIDX = "USRDB"], [boolean $debug = FALSE])
 int getDefaultProdTypeId ([boolean $debug = FALSE])
 string getHTMLDetail ([boolean $checkDate = TRUE], [boolean $checkGroup = TRUE], [string $loginUrl = NULL], [boolean $debug = FALSE])
 string getHTMLLink ([array $valArr = NULL], [string $aAddTag = ""], [bool $debug = FALSE])
 string getHTMLProductList ([boolean $checkDate = TRUE], [ $checkGroup = TRUE], [boolean $debug = FALSE])
 int getId ()
 int getLangId ()
 string getLinkUrl ([ $valArr = NULL], [bool $debug = FALSE])
 array getProducts ([boolean $showAll = FALSE], [string $whereAdd = ""], [boolean $debug = FALSE], [boolean $forceReload = FALSE])
 string getProductWhere ([boolean $showAll = FALSE], [string $whereAdd = ""], [boolean $debug = FALSE])
 int getProjId ()
 string getSideMenuLink ([string $class = ""], [bool $debug = FALSE])
 string getTitle ()
 int getTypeId ()
 bool hasChildrenToShow ([bool $filtered = FALSE], [bool $checkDate = TRUE], [bool $checkGroup = TRUE], [bool $debug = FALSE])
 boolean hasProductsToShow ([boolean $checkShow = TRUE], [boolean $checkDate = TRUE], [boolean $checkGroup = TRUE], [boolean $checkParts = FALSE], [boolean $debug = FALSE], [boolean $checkChildren = TRUE], [boolean $forceReload = FALSE])
 boolean isToShow ([boolean $checkDate = TRUE], [boolean $checkGroup = TRUE], [boolean $debug = FALSE], [boolean $checkShow = TRUE], [ $checkProducts = TRUE], [ $checkParts = FALSE])
 boolean populateType ([boolean $debug = FALSE])
 boolean productsAllowed ([boolean $debug = FALSE])
 void setProductWhere (string $where)
 void setTitle (string $aTitle)
 void setTypeId (int $aId, [boolean $debug = FALSE])
 void writeSideMenuRow ([string $class = ""], bool $debug)
 void writeSideMenuRowOnPath ( $treePath, [string $class = ""], [bool $debug = FALSE])
 void writeTableRowChildren ([int $expandLevel = 0], [ $useCache = TRUE], [bool $debug = FALSE], bool $useChace)
 void writeTableRowThis (bool $debug)
Variables
string $myChildClass = "PRO_GROUP_NODE" (line 62)

Redefinition of:
DBMS_TREE_NODE::$myChildClass
mixed $myClassSrcFile = __FILE__ (line 72)
  • staticvar: $myClassSrcFile 0:

Redefinition of:
DBMS_TREE_NODE::$myClassSrcFile
string $myGlobalTreeKey = "T_PRO_GROUP" (line 37)
  • var: index in $GLOABLS['DBMS_TREE'][]
array $myGrpTypeArr = NULL (line 67)
  • var: row of T_PRO_GRPTYPE
mixed $myIdFld = "PGP_ID" (line 47)
  • staticvar: string $myIdFld: id column = root

Redefinition of:
DBMS_TREE_NODE::$myIdFld
mixed $myParentFld = "PGP_PARENT" (line 52)
  • staticvar: string $myParentFld: name of the parent column

Redefinition of:
DBMS_TREE_NODE::$myParentFld
mixed $mySortFld = "PGP_SORTORDER" (line 57)
  • staticvar: string $mySortFld: name of the sort field

Redefinition of:
DBMS_TREE_NODE::$mySortFld
mixed $myTable = "T_PRO_GROUP" (line 42)
  • staticvar: string $myTable:

Redefinition of:
DBMS_TABLEOBJ::$myTable
NOT FINAL !!!!!
string $prodFilter = "" (line 85)
  • since: pk-06-02-08
double $prodPopulateTS (line 90)
  • since: pk-06-02-08
string $prodWhere = "" (line 78)
  • since: pk-05-08-25

Inherited Variables

Inherited from DBMS_TREE_NODE

DBMS_TREE_NODE::$changesParent
DBMS_TREE_NODE::$level
DBMS_TREE_NODE::$myChildCacheTTL
DBMS_TREE_NODE::$myChildKeys
DBMS_TREE_NODE::$myChildren
DBMS_TREE_NODE::$myChildrenPopulateTS
DBMS_TREE_NODE::$myFilterArr
DBMS_TREE_NODE::$myLink
DBMS_TREE_NODE::$myParent
DBMS_TREE_NODE::$myTree
DBMS_TREE_NODE::$myTreeClass
DBMS_TREE_NODE::$orderNr

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
addChildNode (line 152)

adds a node to childArray($key)

int addChildNode ( &$aNode, [boolean $debug = FALSE], DBMS_TREE_NODE $aNode)
  • DBMS_TREE_NODE $aNode
  • boolean $debug
  • &$aNode

Redefinition of:
DBMS_TREE_NODE::addChildNode()
adds a node to childArray($key)
checkShowDate (line 408)

checks if the menu is to show from date

return values are:

  • 1: yes
  • 0: showtill is outdate
  • -2: showfrom is not reached

  • since: pk-04-07-23
int checkShowDate ([ $debug = FALSE])
  • $debug
dbGetForm (line 289)

returns a form for table T_PRO_GROUP

if $frmName isset this form is returned if $frmName is empty the form assigned to the type is returned

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
dbGetProLstForm (line 605)

returns the list form for the products under this group

NOTE: if you have a common produkt structure under this group you can use this if not it would be better to use getHTMLProductList and define templates for the product types

  • since: pk-07-02-14
DBMS_FORM &dbGetProLstForm ([boolean $debug = FALSE], int $mode)
  • int $mode
  • boolean $debug
dbInsert (line 107)

inserts a new row to the table

  • return: returns the autoIncFld ID if exists or 1 on success
  • since: pk-04-08-25
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 135)

replaces a row in the table

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

  • since: pk-06-02-07
bool dbReplace ([string $gDBIDX = "USRDB"], [boolean $debug = FALSE])
  • string $gDBIDX: Index of $GLOBALS to the db object
  • boolean $debug: show debug info

Redefinition of:
DBMS_TABLEOBJ::dbReplace()
replaces a row in the table
getDefaultProdTypeId (line 456)

returns the default product type for products in this group if the current value is 0 ([default]) the tree is searched upwords

  • since: pk-07-02-15
int getDefaultProdTypeId ([boolean $debug = FALSE])
  • boolean $debug
getHTMLDetail (line 724)

returns the html code for the detail page $#PRODUCTLIST$ is replaced by a list of all products to show

  • since: pk-05-06-20
string getHTMLDetail ([boolean $checkDate = TRUE], [boolean $checkGroup = TRUE], [string $loginUrl = NULL], [boolean $debug = FALSE])
  • boolean $checkDate
  • boolean $checkGroup
  • string $loginUrl
  • boolean $debug
getHTMLLink (line 660)

returns the <a ... </a> tag for the menu link

  • version: pk-05-01-21
  • todo:
string getHTMLLink ([array $valArr = NULL], [string $aAddTag = ""], [bool $debug = FALSE])
  • array $valArr
  • string $aAddTag
  • bool $debug
getHTMLProductList (line 687)

returns the html code for the product list

  • version: pk-05-08-25
  • version: pk-06-11-27
string getHTMLProductList ([boolean $checkDate = TRUE], [ $checkGroup = TRUE], [boolean $debug = FALSE])
  • boolean $checkDate
  • boolean $debug
  • $checkGroup
getId (line 201)

returns the menu id

  • since: pk-04-12-14
int getId ()

Redefinition of:
DBMS_TREE_NODE::getId()
returns the id
getLangId (line 192)

returns the language id

int getLangId ()
getLinkUrl (line 639)

returns the link url

  • since: pk-05-01-20
string getLinkUrl ([ $valArr = NULL], [bool $debug = FALSE])
  • bool $debug
  • $valArr
getProducts (line 531)

returns an array of PRODUCT objects

  • version: pk-05-08-24
  • version: pk-06-02-08 cache added
  • since: pk-05-06-20
array getProducts ([boolean $showAll = FALSE], [string $whereAdd = ""], [boolean $debug = FALSE], [boolean $forceReload = FALSE])
  • boolean $showAll
  • string $whereAdd
  • boolean $debug
  • boolean $forceReload
getProductWhere (line 492)

returns a query to select all products

  • version: pk-05-08-25
  • since: pk-05-06-20
string getProductWhere ([boolean $showAll = FALSE], [string $whereAdd = ""], [boolean $debug = FALSE])
  • boolean $showAll
  • string $whereAdd
  • boolean $debug
getProjId (line 184)

returns the project id

int getProjId ()
getSideMenuLink (line 797)

returns the html-code for the sidemenu link

  • todo: change to progroup
string getSideMenuLink ([string $class = ""], [bool $debug = FALSE])
  • string $class
  • bool $debug
getTitle (line 161)

returns the Title or the name if title is null

string getTitle ()
getTypeId (line 218)

returns the product group type ID

  • since: pk-07-02-14
int getTypeId ()
hasChildrenToShow (line 383)

checks if the node has children which are on

  • version: pk-05-06-14
bool hasChildrenToShow ([bool $filtered = FALSE], [bool $checkDate = TRUE], [bool $checkGroup = TRUE], [bool $debug = FALSE])
  • bool $filtered: use filter
  • bool $checkDate
  • bool $checkGroup
  • bool $debug
hasProductsToShow (line 576)

returns if the group has products to show

  • todo: check group children
boolean hasProductsToShow ([boolean $checkShow = TRUE], [boolean $checkDate = TRUE], [boolean $checkGroup = TRUE], [boolean $checkParts = FALSE], [boolean $debug = FALSE], [boolean $checkChildren = TRUE], [boolean $forceReload = FALSE])
  • boolean $checkShow
  • boolean $checkDate
  • boolean $checkGroup
  • boolean $checkParts
  • boolean $debug
  • boolean $checkChildren
  • boolean $forceReload
isToShow (line 333)

checks if the node is on

  • version: pk-05-01-11
  • version: pk-06-01-30
boolean isToShow ([boolean $checkDate = TRUE], [boolean $checkGroup = TRUE], [boolean $debug = FALSE], [boolean $checkShow = TRUE], [ $checkProducts = TRUE], [ $checkParts = FALSE])
  • boolean $checkDate
  • boolean $checkGroup
  • boolean $debug
  • boolean $checkShow
  • $checkProducts
  • $checkParts
populateType (line 247)

selects the type row form T_PRO_GRPTYPE

  • version: pk-07-02-14
boolean populateType ([boolean $debug = FALSE])
  • boolean $debug
productsAllowed (line 437)

returns if produkts are allowed in the group

  • since: pk-07-02-14 (Tableversion 15)
boolean productsAllowed ([boolean $debug = FALSE])
  • boolean $debug
setProductWhere (line 476)

sets a where clause for products if this is set it PRO_GROUP_NODE::getProductWhere returnes it without modification

  • since: pk-05-08-25
void setProductWhere (string $where)
  • string $where
setTitle (line 176)

sets the title

  • since: pk-06-01-26
void setTitle (string $aTitle)
  • string $aTitle
setTypeId (line 231)

sets the product group type ID

  • since: pk-07-02-14
void setTypeId (int $aId, [boolean $debug = FALSE])
  • int $aId
  • boolean $debug
writeSideMenuRow (line 808)

writes a sidemneu row

void writeSideMenuRow ([string $class = ""], bool $debug)
  • string $class: css-style class to use for <a>
  • bool $debug
writeSideMenuRowOnPath (line 822)

writes a sidemneu row on Path to the selected node

void writeSideMenuRowOnPath ( $treePath, [string $class = ""], [bool $debug = FALSE])
  • string $class: css-style class to use for <a>
  • bool $debug
  • $treePath
writeTableRowChildren (line 766)

echos a tree intend called by write children

void writeTableRowChildren ([int $expandLevel = 0], [ $useCache = TRUE], [bool $debug = FALSE], bool $useChace)
  • int $expandLevel
  • bool $useChace
  • bool $debug
  • $useCache
writeTableRowThis (line 750)

echos a the row in a table OVERRIDE IN SUB CLASS to change layout

void writeTableRowThis (bool $debug)
  • bool $debug

Inherited Methods

Inherited From DBMS_TREE_NODE

 DBMS_TREE_NODE::DBMS_TREE_NODE()
 DBMS_TREE_NODE::addChildNode()
 DBMS_TREE_NODE::changeParent()
 DBMS_TREE_NODE::changesParent()
 DBMS_TREE_NODE::childListIsPopulated()
 DBMS_TREE_NODE::filterAdd()
 DBMS_TREE_NODE::filterClear()
 DBMS_TREE_NODE::filterRemoveKey()
 DBMS_TREE_NODE::getChild()
 DBMS_TREE_NODE::getChildQueryString()
 DBMS_TREE_NODE::getChildrenList()
 DBMS_TREE_NODE::getChildTblName()
 DBMS_TREE_NODE::getGlobalTreeKey()
 DBMS_TREE_NODE::getId()
 DBMS_TREE_NODE::getLevel()
 DBMS_TREE_NODE::getOrderNr()
 DBMS_TREE_NODE::getParentId()
 DBMS_TREE_NODE::getParentObj()
 DBMS_TREE_NODE::getRootPath()
 DBMS_TREE_NODE::getRootPathIdx()
 DBMS_TREE_NODE::getTree()
 DBMS_TREE_NODE::hasChildren()
 DBMS_TREE_NODE::matchFilter()
 DBMS_TREE_NODE::moveChildDown()
 DBMS_TREE_NODE::moveChildUp()
 DBMS_TREE_NODE::newChildObj()
 DBMS_TREE_NODE::newTreeObj()
 DBMS_TREE_NODE::numberOfChildren()
 DBMS_TREE_NODE::populateChildren()
 DBMS_TREE_NODE::populateTree()
 DBMS_TREE_NODE::resortChildren()
 DBMS_TREE_NODE::setChildClassVar()
 DBMS_TREE_NODE::setConfigurationArr()
 DBMS_TREE_NODE::setId()
 DBMS_TREE_NODE::setLevel()
 DBMS_TREE_NODE::setLink()
 DBMS_TREE_NODE::setOrderNr()
 DBMS_TREE_NODE::setParentId()
 DBMS_TREE_NODE::setParentObj()
 DBMS_TREE_NODE::setTreeObj()

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