Class OCSP_FORM_BLOCK

Description

class OCSP_FORM_BLOCK

Located in /db/forms/OCSP_FORM_BLOCK.phpclass (line 45)

OCSP_OBJ
   |
   --OCSP_FORM_BLOCK
Class Constant Summary
 CLASS_SRC_FILE = __FILE__
Variable Summary
Method Summary
 OCSP_FORM_BLOCK OCSP_FORM_BLOCK ( &$aForm, [boolean $debug = False], OCSP_FORM $aForm)
 void addFieldObj ( &$aField, [boolean $debug = False], DBMS_FIELD $aField)
 DBMS_FIELD &addNewField (string $colName, string $colType, [string $table = "__NO-DBFIELD__"], [int $size = 0], [boolean $debug = False])
 boolean addTable (string $aTable, [boolean $asHidden = True], [boolean $debug = False])
 OCSP_FORM_BLOCK getBlockObjFromRow ( &$aForm, array $row, [boolean $debug = False], OCSP_FORM $aForm)
 string getCssClass ()
 string getCssStyle ()
 OCSP_DB &getDBObj ([boolean $debug = False])
 string getDesc ()
 string getExportString ()
 string getExtConf ()
 DBMS_FIELD &getField (string $aFldName, [string $aTable = ""], [string $aFldKey = ""], [boolean $debug = False])
 array getFields ([int $mode = -1], [boolean $debug = False])
 int getFrmId ()
 int getId ()
 mixed getMyDBColValue (string $col)
 string getName ()
 void getNofFields ([int $mode = -1], [boolean $debug = False])
 int getOrderNr ()
 array getShowFields ()
 string getTitle ()
 int getViewType ()
 boolean hasFieldInScope (string $scope, [boolean $debug = False])
 void importFromArray (array $impArray, [boolean $debug = False])
 boolean isFieldSet ()
 boolean isInline ()
 boolean isLinked ()
 boolean isTab ()
 boolean isTable ()
 boolean isToShow (int $mode, [boolean $debug = False])
 void loadFromDB ([boolean $debug = False])
 void loadMyFieldsFromDb ([boolean $debug = False])
 boolean moveField ( &$field, [int $movedir = 0], [int $newPos = 0], [boolean $debug = False], mixed $field)
 void removeFieldObj ( &$aField, [boolean $debug = False], DBMS_FIELD $aField)
 void setDBObj ( &$dbObj, OCSP_DB $dbObj)
 void setDBRow (array $dbRow, [boolean $debug = False])
 void setId (unknown_type $aId)
 void setMyDBColValue (string $col, mixed $val)
 void setMyForm ( &$aForm, OCSP_FORM $aForm)
 void setName (string $aName)
 void setOrderNr (int $ordNr)
 boolean showButtons ()
 void storeFldToDb (DBMS_FIELD $aFld, [boolean $debug = False], [foreceLinked $forceLinked = False])
 void storeToDB ([boolean $debug = False])
 boolean updateBlockFromPost ([string $arrName = 'DBVAL'], [array $colNames = NULL], [boolean $debug = False])
 void writeToFileCache (resource $hFile, [boolean $debug = False])
Variables
int $curFieldMode = -99 (line 76)
  • access: protected
boolean $fieldsLoaded = False (line 84)
  • access: protected
mixed $FRB_GROUP_SHOW (line 96)
  • access: protected
mixed $FRB_SHOW_COPY = 1 (line 93)
  • access: protected
mixed $FRB_SHOW_DELETE = 1 (line 94)
  • access: protected
mixed $FRB_SHOW_EDIT = 1 (line 91)
  • access: protected
mixed $FRB_SHOW_LIST = 1 (line 95)
  • access: protected
mixed $FRB_SHOW_NEW = 1 (line 92)
  • access: protected
mixed $FRB_SHOW_RO = 1 (line 90)

db vars

  • access: protected
array $myBlockDBColumns = array('FRB_ID','FRM_ID','FRB_VIEWTYPE','FRB_ORIG_FRB_ID','FRB_ORIG_FRM_ID','FRB_SORTORDER','FRB_PARENT',
'FRB_SHOW_RO','FRB_SHOW_NEW','FRB_SHOW_EDIT','FRB_SHOW_DELETE','FRB_SHOW_LIST','FRB_SHOW_COPY','FRB_GROUP_SHOW','FRB_GROUP_NEW','FRB_GROUP_EDIT',
'FRB_CLASS','FRB_CLASSSRC','FRB_TABLES','FRB_LINKCOLS','FRB_NAME','FRB_OBJVALS',
'FRB_SHOW_FRMBUTTONS','FRB_CSS_CLASS','FRB_CSS_STYLE','FRB_DESC','FRB_EXTCONF')
(line 102)
  • access: protected
OCSP_DB $myDBObj = NULL (line 111)
  • access: protected

Redefinition of:
OCSP_OBJ::$myDBObj
array $myFields = array() (line 70)
  • access: protected
OCSP_FORM $myForm = NULL (line 64)
  • access: protected

Inherited Variables

Inherited from OCSP_OBJ

OCSP_OBJ::$global_currentUser
OCSP_OBJ::$global_defaultDBObj_read
OCSP_OBJ::$global_defaultDBObj_write
OCSP_OBJ::$staticClassVars
Methods
Constructor OCSP_FORM_BLOCK (line 123)
OCSP_FORM_BLOCK OCSP_FORM_BLOCK ( &$aForm, [boolean $debug = False], OCSP_FORM $aForm)
addFieldObj (line 1165)

adds a field to $this->myFields and removes it from the original block

void addFieldObj ( &$aField, [boolean $debug = False], DBMS_FIELD $aField)
addNewField (line 1225)

creates a new field and add it to the block

DBMS_FIELD &addNewField (string $colName, string $colType, [string $table = "__NO-DBFIELD__"], [int $size = 0], [boolean $debug = False])
  • string $colName
  • string $colType
  • string $table
  • int $size
  • boolean $debug
addTable (line 913)

add all columns in a table to the block

  • return: requires OCSP_FORM_DBCONTROLL.phpclass
boolean addTable (string $aTable, [boolean $asHidden = True], [boolean $debug = False])
  • string $aTable
  • boolean $asHidden: if true the columns are added as hidden fields
  • boolean $debug
getBlockObjFromRow (line 139)

generates a new block form from a database row

  • todo: OCSP_FORM_BLOCK::getBlockObjFromRow() load class if not loaded
OCSP_FORM_BLOCK getBlockObjFromRow ( &$aForm, array $row, [boolean $debug = False], OCSP_FORM $aForm)
  • OCSP_FORM $aForm
  • array $row
  • boolean $debug
  • &$aForm
getCssClass (line 387)
string getCssClass ()
getCssStyle (line 395)
string getCssStyle ()
getDBObj (line 461)

returns the db object from the form

  • access: public
OCSP_DB &getDBObj ([boolean $debug = False])
  • boolean $debug

Redefinition of:
OCSP_OBJ::getDBObj()
allowed modes are:
getDesc (line 403)
string getDesc ()
getExportString (line 756)

returns the form export string (php array)

  • since: pk-08-10-31
  • access: public
string getExportString ()
getExtConf (line 414)

returns the extJS configuration options for the block

  • since: pk-08-09-22
string getExtConf ()
getField (line 1125)

returns a field object

  • version: pk-08-07-31
  • version: pk-08-11-06 object values added to table (_OV)
DBMS_FIELD &getField (string $aFldName, [string $aTable = ""], [string $aFldKey = ""], [boolean $debug = False])
  • string $aFldName
  • string $aTable: (empty to search in all tables)
  • string $aFldKey
  • boolean $debug
getFields (line 1056)
  • return: of DBMS_FIELDS
  • todo: cacheing
array getFields ([int $mode = -1], [boolean $debug = False])
  • int $mode: (-1 all modes)
  • boolean $debug
getFrmId (line 246)
int getFrmId ()
getId (line 264)
int getId ()
getLinkedFromBlockId (line 444)
int getLinkedFromBlockId ()
getLinkedFromFormId (line 436)
int getLinkedFromFormId ()
getMyDBColValue (line 375)
mixed getMyDBColValue (string $col)
  • string $col
getMyForm (line 229)
OCSP_FORM &getMyForm ()
getName (line 288)
string getName ()
getNofFields (line 1041)

returns the number of fields in the form

void getNofFields ([int $mode = -1], [boolean $debug = False])
  • int $mode
  • boolean $debug
getOrderNr (line 324)
int getOrderNr ()
getShowFields (line 347)

returns an array with the show fields

array getShowFields ()
getTitle (line 307)

returns $this->FRB_NAME if intval($this->getId()

string getTitle ()
getViewType (line 210)
int getViewType ()
hasFieldInScope (line 1380)

checks if we have a field in $scope

boolean hasFieldInScope (string $scope, [boolean $debug = False])
  • string $scope
  • boolean $debug
importFromArray (line 804)

imports the form from an array NOTE: does not save the form

  • access: public
void importFromArray (array $impArray, [boolean $debug = False])
  • array $impArray
  • boolean $debug
isFieldSet (line 183)
boolean isFieldSet ()
isInline (line 201)
boolean isInline ()
isLinked (line 423)

returns if the block is linked from another form

boolean isLinked ()
isTab (line 174)
boolean isTab ()
isTable (line 192)
boolean isTable ()
isToShow (line 1403)

returns if the block is to show in $mode checks $this->show.... and FRB_GROUP_...

  • access: public
boolean isToShow (int $mode, [boolean $debug = False])
  • int $mode
  • boolean $debug
loadFromDB (line 489)

loads the block form the database

  • access: public
void loadFromDB ([boolean $debug = False])
  • boolean $debug
loadMyFieldsFromDb (line 952)

loads the fields form the database

  • access: public
void loadMyFieldsFromDb ([boolean $debug = False])
  • boolean $debug
moveField (line 1285)

moves a field in the block

  • access: public
boolean moveField ( &$field, [int $movedir = 0], [int $newPos = 0], [boolean $debug = False], mixed $field)
  • mixed $field: (DBMS_FIELD or field name)
  • int $movedir: (-1 = up,0=position,1=down)
  • int $newPos
  • boolean $debug
  • &$field
removeFieldObj (line 1197)

removes the field from the block not from the database

void removeFieldObj ( &$aField, [boolean $debug = False], DBMS_FIELD $aField)
setDBObj (line 479)
  • access: public
void setDBObj ( &$dbObj, OCSP_DB $dbObj)

Redefinition of:
OCSP_OBJ::setDBObj()
sets the database object (link)
setDBRow (line 630)

sets the database row to the object

  • access: public
void setDBRow (array $dbRow, [boolean $debug = False])
  • array $dbRow
  • boolean $debug
setId (line 279)

sets the block id to the object and the fields

void setId (unknown_type $aId)
  • unknown_type $aId
setMyDBColValue (line 363)
void setMyDBColValue (string $col, mixed $val)
  • string $col
  • mixed $val
setMyForm (line 237)
void setMyForm ( &$aForm, OCSP_FORM $aForm)
setName (line 316)
void setName (string $aName)
  • string $aName
setOrderNr (line 337)
void setOrderNr (int $ordNr)
  • int $ordNr
showButtons (line 219)
boolean showButtons ()
storeFldToDb (line 579)

writes the field data to T_DBMS_FORMFIELDS

void storeFldToDb (DBMS_FIELD $aFld, [boolean $debug = False], [foreceLinked $forceLinked = False])
  • DBMS_FIELD $aFld
  • boolean $debug
  • foreceLinked $forceLinked: (if false linked block fields are not stored. this should only be tree if a block is linked to hide existing fields)
storeToDB (line 503)

stores the block to the database

void storeToDB ([boolean $debug = False])
  • boolean $debug
updateBlockFromPost (line 647)

updates a block form $_POST[$arrName] values

boolean updateBlockFromPost ([string $arrName = 'DBVAL'], [array $colNames = NULL], [boolean $debug = False])
  • string $arrName
  • array $colNames
  • boolean $debug
writeToFileCache (line 874)
void writeToFileCache (resource $hFile, [boolean $debug = False])
  • resource $hFile
  • boolean $debug

Inherited Methods

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

Inherited Constants

Inherited from OCSP_OBJ

OCSP_OBJ::CLASS_SRC_FILE

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