Class OCSP_FRMCONTR_LIST

Description

class OCSP_FRMCONTR_LIST

  • author: Peter Krebs (pk) <pitlinz@users.sourceforge.net>
  • version: pk-08-01-21 // extends OCSP_OBJ
  • version: $Id: OCSP_FRMCONTR.phpclass,v 1.33 2008/12/17 16:28:51 peterkrebs Exp $
  • project: Open CSP-Management
  • since: pk-07-07-02
  • license: GNU Public License

Located in /db/forms/OCSP_FRMCONTR_LIST.phpclass (line 38)

OCSP_OBJ
   |
   --OCSP_FRMCONTR
      |
      --OCSP_FRMCONTR_LIST
Direct descendents
Class Description
Abstract class OCSP_FRMCONTR_CACHEDLIST abstract class OCSP_FRMCONTR_CACHEDLIST
 class openCSP class file
 class OCSP_FRMCONTR_AJAXLIST class OCSP_FRMCONTR_AJAXLIST
 class OCSP_FRMCONTR_PEAR_DATAGRID openCSP class OCSP_FRMCONTR_PEAR_DATAGRID
Variable Summary
Method Summary
 void addCmdButton (string $aCmd, string $aTmpl)
 void addFooterCommand ( $aName,  $htmlTag)
 boolean checkAutopageing ([ $debug = False])
 array getCmdButtons ([int $pos = 0])
 string getColCmd (DBMS_FIELD $objField, [boolean $debug = False])
 string getColLink (DBMS_FIELD $objField, [boolean $debug = False])
 string getColLinkEnd (DBMS_FIELD $objField, [boolean $debug = False])
 string getFilterWhere ([boolean $debug = False])
 string getFooterLinks ([boolean $debug = False])
 string getHeadColEvents ( &$objField, [boolean $debug = False], DBMS_FIELD $objField)
 string getHeadRowEvents ([boolean $debug = False])
 int getLimit ()
 string getListGroups (boolean $debug)
 string getListKey ()
 string getListQuery ([boolean $debug = False])
 array getListRow ([boolean $debug = False])
 array getListValues ()
 int getNofBtnCols ()
 mixed getNofListRows ()
 int getNofTotalRows ([boolean $debug = False])
 int getOffset ([boolean $debug = False])
 string getOrderBy ([boolean $debug = False])
 string getPageingBackButton ([ $debug = False])
 void getPageingNext ()
 string getRowButtons ([string $outerElem = "td"], [string $linkElem = "a"], [boolean $debug = False])
 string getRowCmd ([boolean $debug = False])
 void getRowId ([ $debug = False])
 string getTableEvents ([boolean $debug = False])
 string getTableId ([boolean $debug = False])
 void initList ([boolean $debug = False])
 boolean loadListObjectValues ([boolean $debug = False], string $tbl, array $fieldNames)
 int loadListValues ([boolean $debug = False], [boolean $forceReload = False])
 void setFooterCmdArr (array $footerCmd, [boolean $debug = False])
 void setLimit (int $limit)
 void setListKey (string $aKey)
 void setListQuery (string $aSqlStatement)
 void setOffset (int $offset)
 void setOrderBy (string $orderStr)
 void setRowCmd (string $event, string $jsCmd)
 boolean valuesAreLoaded ()
Variables
double $listLoadTS (line 83)
  • access: protected
array $lstObjValCols = array() (line 64)
  • access: protected
double $lstObjValTS (line 89)
  • access: protected
string $lstQuery = "" (line 71)
  • var: (without limit,offset and order)
  • access: protected
array $lstTables = array() (line 58)
  • var: array( 'TABLE'=string 'COLS'=>array() 'KEYS'=array() )
  • access: protected
array $lst_groupValues (line 120)
  • access: protected
int $lst_limit (line 101)
  • access: protected
int $lst_offset (line 107)
  • access: protected
string $lst_orderBy = "" (line 126)
  • access: protected
string $lst_pageingUrl = "" (line 114)

url for (auto)pageing

  • access: protected
int $myListIdx (line 95)
  • access: protected
string $myListKey = "" (line 172)
  • access: protected
array $myListValues = array() (line 77)
  • access: protected
array $myRowCmds = array() (line 147)

an array with a java event as key and a js-function template

  • access: protected
  • example: example not found
array $tbl_footerCmds = array() (line 166)
  • access: protected
array $tbl_rowBtnCmds = array() (line 160)

array of command templates for each row $tbl_rowBtnCmds[CMDNAME]=CMDTMPLATE

it will generate a button - column as follows:

&lt;td&gt&lta pcf_tmpl_parse(CMDTMPLATE,$this->curRow) &gt; $this->myView->getButtonImgTag(CMDNMAE) &lt;a&gt;

  • access: protected
string $tbl_sortLink = "" (line 133)
  • access: protected

Inherited Variables

Inherited from OCSP_FRMCONTR

OCSP_FRMCONTR::$checkRights_hasDBRightsSet
OCSP_FRMCONTR::$checkRights_userRights
OCSP_FRMCONTR::$curRow
OCSP_FRMCONTR::$myActionURL
OCSP_FRMCONTR::$myCommands
OCSP_FRMCONTR::$myDBObj
OCSP_FRMCONTR::$myFilter
OCSP_FRMCONTR::$myForm
OCSP_FRMCONTR::$myjOCSPHash
OCSP_FRMCONTR::$myReloadUrl
OCSP_FRMCONTR::$myView
OCSP_FRMCONTR::$rowPopulateTS
OCSP_FRMCONTR::$userCanShowMethod

Inherited from OCSP_OBJ

OCSP_OBJ::$global_currentUser
OCSP_OBJ::$global_defaultDBObj_read
OCSP_OBJ::$global_defaultDBObj_write
OCSP_OBJ::$staticClassVars
Methods
addCmdButton (line 432)

adds a button command to the end of a row

void addCmdButton (string $aCmd, string $aTmpl)
  • string $aCmd
  • string $aTmpl
addFooterCommand (line 1063)
  • access: public
void addFooterCommand ( $aName,  $htmlTag)
  • $aName
  • $htmlTag
checkAutopageing (line 948)

pageing is tourned on if the $_GET['offset'] and $_GET['limit'] are set

  • since: pk-08-11-21
  • access: public
boolean checkAutopageing ([ $debug = False])
  • $debug
getCmdButtons (line 445)

returns the row command button array

  • since: pk-08-06-02
array getCmdButtons ([int $pos = 0])
  • int $pos: // -1: left; 1: right (default); 0: both
getColCmd (line 1132)
string getColCmd (DBMS_FIELD $objField, [boolean $debug = False])
getColLink (line 1143)
string getColLink (DBMS_FIELD $objField, [boolean $debug = False])
getColLinkEnd (line 1161)
string getColLinkEnd (DBMS_FIELD $objField, [boolean $debug = False])
getFilterWhere (line 352)

returns the where condition for the filter

you have to prepend "WHERE" OR "AND" to the returned string

  • version: pk-08-10-01 if filter value is an array -> make or statement
  • since: pk-08-06-26
  • access: public
string getFilterWhere ([boolean $debug = False])
  • boolean $debug
getFooterLinks (line 1033)
  • access: public
string getFooterLinks ([boolean $debug = False])
  • boolean $debug
getHeadColEvents (line 929)
  • access: public
string getHeadColEvents ( &$objField, [boolean $debug = False], DBMS_FIELD $objField)
getHeadRowEvents (line 917)
  • access: public
string getHeadRowEvents ([boolean $debug = False])
  • boolean $debug
getLimit (line 221)
int getLimit ()
getListGroups (line 803)

checks the listgroups for the current row and calls $this->myView->getGroupRow if it's to do

string getListGroups (boolean $debug)
  • boolean $debug
getListKey (line 195)
  • access: public
string getListKey ()
getListQuery (line 246)

returns the unfiltered list sql statement

if $this->lstQuery is empty the query is generated out of the form

  • since: pk-08-01-19
string getListQuery ([boolean $debug = False])
  • boolean $debug
getListRow (line 756)
array getListRow ([boolean $debug = False])
  • boolean $debug
getListValues (line 747)
  • since: pk-07-09-16
array getListValues ()
getNofBtnCols (line 421)
  • return: (the size of $this->tbl_rowBtnCmds)
  • access: public
int getNofBtnCols ()
getNofListRows (line 518)
  • return: (False if the list rows have not been loaded else the size of $this->myListValues)
mixed getNofListRows ()

Redefined in descendants as:
getNofTotalRows (line 836)

returns the total number of rows

  • since: pk-08-05-30
int getNofTotalRows ([boolean $debug = False])
  • boolean $debug
getOffset (line 204)
int getOffset ([boolean $debug = False])
  • boolean $debug
getOrderBy (line 402)
string getOrderBy ([boolean $debug = False])
  • boolean $debug

Redefined in descendants as:
getPageingBackButton (line 972)

returns the html code for the pageing back button

  • access: public
string getPageingBackButton ([ $debug = False])
  • $debug
getPageingNext (line 1001)
  • access: public
void getPageingNext ()
getRowButtons (line 1179)
string getRowButtons ([string $outerElem = "td"], [string $linkElem = "a"], [boolean $debug = False])
  • string $outerElem
  • string $linkElem
  • boolean $debug
getRowCmd (line 1112)
  • requires: __OCSP_PHPINCPATH__."common/pcf_templates.phpinc";
  • access: public
string getRowCmd ([boolean $debug = False])
  • boolean $debug
getRowId (line 1088)
void getRowId ([ $debug = False])
  • $debug
getTableEvents (line 904)
  • access: public
string getTableEvents ([boolean $debug = False])
  • boolean $debug
getTableId (line 893)
  • return: the table id
  • access: public
string getTableId ([boolean $debug = False])
  • boolean $debug
initList (line 531)
void initList ([boolean $debug = False])
  • boolean $debug
invalidateValues (line 510)

sets the loaded values as invalide

  • since: pk-08-11-26
  • access: public
void invalidateValues ()
loadListObjectValues (line 588)
  • todo: OCSP_FRMCONTR_LIST::loadListObjectValues() replace inline SQL
boolean loadListObjectValues ([boolean $debug = False], string $tbl, array $fieldNames)
  • string $tbl
  • array $fieldNames
  • boolean $debug
loadListValues (line 689)

loads the list values from the database to $this->myListValues an always sets $this->listLoadTS to time()

  • return: number of rows found or False
  • version: pk-08-01-19 use $this->getListQuery to set $this->lstQuery
  • version: pk-08-02-15 ~ => LIKE filter type added
  • version: pk-08-06-26
  • version: pk-08-11-26 $forceReload added
  • todo: OCSP_FRMCONTR_LIST::loadListValues() replace inline SQL
int loadListValues ([boolean $debug = False], [boolean $forceReload = False])
  • boolean $debug
  • boolean $forceReload

Redefined in descendants as:
setFooterCmdArr (line 1080)

sets the footer cmd array

NOTE: overwrites existing commands

command array:

  • name
  • html code

void setFooterCmdArr (array $footerCmd, [boolean $debug = False])
  • array $footerCmd
  • boolean $debug
setLimit (line 229)
void setLimit (int $limit)
  • int $limit

Redefined in descendants as:
setListKey (line 187)
  • access: public
void setListKey (string $aKey)
  • string $aKey
setListQuery (line 393)

sets a query for the list elements

void setListQuery (string $aSqlStatement)
  • string $aSqlStatement
setOffset (line 213)
void setOffset (int $offset)
  • int $offset

Redefined in descendants as:
setOrderBy (line 411)
void setOrderBy (string $orderStr)
  • string $orderStr
setRowCmd (line 487)

tr code is generated as follows

  1.      echo "&lt;tr $event=\"".pcf_escape_doubleQuote(pcf_tmpl_parse($jsCmd)."\"&gt;";

note sending $event twice overwrites the older setting

void setRowCmd (string $event, string $jsCmd)
  • string $event
  • string $jsCmd
valuesAreLoaded (line 500)
  • return: if the list values have been loaded
  • access: public
boolean valuesAreLoaded ()

Inherited Methods

Inherited From OCSP_FRMCONTR

 OCSP_FRMCONTR::__construct()
 OCSP_FRMCONTR::addFilter()
 OCSP_FRMCONTR::checkRights()
 OCSP_FRMCONTR::getActionURL()
 OCSP_FRMCONTR::getAjaxObj()
 OCSP_FRMCONTR::getCurrentRow()
 OCSP_FRMCONTR::getCurRow()
 OCSP_FRMCONTR::getCurValue()
 OCSP_FRMCONTR::getDBObj()
 OCSP_FRMCONTR::getFilter()
 OCSP_FRMCONTR::getMyForm()
 OCSP_FRMCONTR::getObjectValues()
 OCSP_FRMCONTR::getReloadUrl()
 OCSP_FRMCONTR::getView()
 OCSP_FRMCONTR::jOCSP_getfrmHash()
 OCSP_FRMCONTR::jOCSP_setfrmHash()
 OCSP_FRMCONTR::parseFieldTmpl()
 OCSP_FRMCONTR::parseRowTmpl()
 OCSP_FRMCONTR::populateRow()
 OCSP_FRMCONTR::rowIsPopulated()
 OCSP_FRMCONTR::saveCurRow()
 OCSP_FRMCONTR::setActionURL()
 OCSP_FRMCONTR::setAjaxObj()
 OCSP_FRMCONTR::setCommand()
 OCSP_FRMCONTR::setCurRow()
 OCSP_FRMCONTR::setCurRowValue()
 OCSP_FRMCONTR::setFilter()
 OCSP_FRMCONTR::setMyForm()
 OCSP_FRMCONTR::setObjectValues()
 OCSP_FRMCONTR::setReloadUrl()
 OCSP_FRMCONTR::setView()
 OCSP_FRMCONTR::set_userCanShowMethod()
 OCSP_FRMCONTR::unsetFilter()
 OCSP_FRMCONTR::validateBlockSubmit()
 OCSP_FRMCONTR::validateSubmit()

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 OCSP_OBJ

OCSP_OBJ::CLASS_SRC_FILE

Documentation generated on Thu, 08 Jan 2009 17:46:29 +0100 by phpDocumentor 1.4.0a2