initialises the object
DBMS_FIELD
DBMS_FIELD
([string $aTable = NULL], [string $aName = NULL], [array $aDesc = NULL], [int $sOrder = 99999], [string $aLabel = ""], [string $aAlias = NULL], [ $aFormId = 0])
-
string
$aTable: name of the table where the field is a column
-
string
$aName: name of the table column
-
array
$aDesc: database column description
-
int
$sOrder: sort order
-
string
$aLabel: Label of the field
-
string
$aAlias: db table alias in a join
-
$aFormId
check if NULL values are allowed
bool
allowNull
()
compares the values of $aDesc (DB Field definition) with the field definition stored in the object
bool
check
(array $aDesc)
return a css style definition for the fieldlist
string
editLst_getAdminLstStyle
()
returns the option list for the class select element
string
editLst_getClassSelectOptions
([boolean $debug = False])
show the filed definition form
void
editTblForm
([bool $showSize = True], [bool $showNull = True])
-
bool
$showSize: show size input
-
bool
$showNull: show input field to handle null values
Redefined in descendants as:
echos the field definition form from the field edit array @see editTbl_getFieldEditArr()
void
editTbl_echoForm
([array $fldEditArr = NULL], [boolen $debug = False])
-
array
$fldEditArr
-
boolen
$debug
returns the field definition form from the field edit array @see editTbl_getFieldEditArr()
string
editTbl_getForm
([array $fldEditArr = NULL], [boolen $debug = False])
-
array
$fldEditArr
-
boolen
$debug
Implementation of:
- INFA_DBMS_FIELD::editTbl_getForm()
- returns the field definition form
checks if a db fieldtype is compatible to the class
boolean
fldTypeIsUseable
(string $fldType, [boolean $debug = False])
-
string
$fldType
-
boolean
$debug
Redefined in descendants as:
returns the addTag parsed as template with global ${$arrName} as data
string
getAddTag
([string $arrName = "DBVAL"])
returns the databas column name
string
getDBColName
([boolean $withAlias = True])
-
boolean
$withAlias: if empty $this::dbDesc['COLNAME'] $this->getName() is returned which should in most cases be same as dbDesc['COLNAME']
returns the database type of the fields column
string
getDBColType
()
returns the field database default value
mixed
getDbDefault
()
returns $dbDesc (COPY OF THE ARRAY)
array
getdbDesc
()
returns the debug mode of the field
- D fldDebug
- G fldDbgGetValue
- A ajaxDebug
string
getDebugMode
()
returns the field default value
if $defaultValue !empty it is returned else getDbDefault is return
mixed
getDefaultValue
([ $debug = False])
Redefined in descendants as:
returns the html code for a field form row
string
getFieldRow
(int $mode, [mixed $aValue = NULL], [boolean $debug = False])
-
int
$mode
-
mixed
$aValue
-
boolean
$debug
returns the row columns for a field row
string
getFieldRowCols
(int $mode, [mixed $aValue = NULL], [boolean $debug = False])
-
int
$mode
-
mixed
$aValue
-
boolean
$debug
Redefined in descendants as:
returns the html code for the field value input / show adds $this->myName to ${$this->myDataArrName}['_DBMS_FIELDS']
string
getFieldTag
(int $mode, [mixed $aValue = NULL], [boolean $debug = False])
-
int
$mode
-
mixed
$aValue
-
boolean
$debug
Redefined in descendants as:
returns the id of the form the field belongs to
int
getFrmId
()
returns the html code for a editable formular element
string
getInputTag
(mixed $aValue, [string $arrName = "DBVAL"], [string $nameAdd = ""], [boolean $debug = False])
-
mixed
$aValue: the value to set
-
string
$arrName
-
string
$nameAdd: append something to name like "[VALUE]" for search forms
-
boolean
$debug: since pk-06-08-09
Redefined in descendants as:
returns the field key ($this->myTableAlias.".".$this->myName)
string
getKey
()
void
getLabelColTag
([ $useTh = False], [ $style = ""], [ $debug = False])
Redefined in descendants as:
void
getListLink
( $aValue, [ $arrName = ""], [ $debug = False])
Redefined in descendants as:
returns the html representation of the field in a list (table col)
mixed
getListValue
([mixed $aValue = NULL], [string $arrName = "DBVAL"], [bool $debug = False])
-
mixed
$aValue: the falue
-
string
$arrName: name of the global array holding data values
-
bool
$debug: show debug info
Redefined in descendants as:
list colspan (<td colspan="x">)
int
getLstColSpan
()
returns a pointer to the owner form or NULL in case of error
-
bool
$debug: since pk-05-01-11
returns the name of the form
string
getMyFormName
()
returns the field name
string
getName
()
returns an 2 dimensional array of object data
- $ret['OBJDESC'] -> discription of the object
- $ret['OBJVAL'] -> get_object_vars($this)
array
getObjectData
([boolean $debug = False])
returns an array of the object vars see also php function get_object_vars
array
getObjectVars
([boolean $debug = False])
returns the orderNr of the field
int
getOrderNr
()
returns the html representation of the field
mixed
getScreenValue
([mixed $aValue = NULL], [string $arrName = "DBVAL"], [bool $debug = False])
-
mixed
$aValue: the falue
-
string
$arrName: name of the global array holding data values
-
bool
$debug: show debug info
Redefined in descendants as:
returns a field setting value
mixed
getSetting
(string $name)
returns the group id which is required to see the field
int
getShowGroup
()
returns the (show) size (chars) of a field
int
getSize
()
returns the source file of the class
without
- $GLOBALS['PROJECT']['PATH']
- __OCSP_PHPINCPATH__ (if not in project path)
overwrite this
string
getSourceFile
([boolean $debug = False])
returns the tabIndex of the field
int
getTabIndex
()
returns the table of the field
string
getTable
()
returns the table alias used in joins normaly this is the same as $this->myTable
string
getTblAlias
()
returns the database column type of the field
string
getType
()
returns the td id of the value col
string
getValId
()
increase orderNr by 1
void
incOrderNr
([int $by = 1])
returns if the field represents an auto_increment column in the database
boolean
isAutoInc
()
returns if the field is enabled in $mode and to show
boolean
isEnabled
(int $mode, [boolean $debug = False])
returns if the field is hidden or not
boolean
isHidden
([string $scope = 'setting'])
boolean
isLayoutFld
()
Redefined in descendants as:
returns if the field is marked as deleted
boolen
isMarkedDeleted
()
returns if the field is (part of) the primary key
boolean
isPrimaryKey
([boolean $debug = False])
returns if a field is shown readonly
boolean
isReadOnlyShown
(int $mode, [boolean $debug = False])
returns if the field is searchable or not
boolean
isSearchable
()
checks if the field is to show due to $this->showQuery
boolean
isToShow
(int $mode, array $dataArr, [boolean $debug = False], [boolean $inFieldGroup = False])
-
int
$mode
-
array
$dataArr
-
boolean
$debug
-
boolean
$inFieldGroup
returns if the list cell can be linked with the ['EDIT'] link
boolean
lstLinksDisabled
()
Redefined in descendants as:
marks the field as deleted by setting $this->myDeleteFlag to true
the next time the field is written to the database it should be deleted
void
markDeleted
()
removes the deleteFlag
void
markUnDeleted
()
save the filed definition form
bool
save
([bool $debug = False])
-
bool
$debug: since pk-04-07-23
Redefined in descendants as:
sets myDataArrName
void
setDataArrName
(string $arrName)
sets the database column description array
void
setdbDesc
(array $dbDesc)
sets a field value
void
setFieldVar
(string $varName, mixed $value, [boolean $debug = False])
-
string
$varName
-
mixed
$value
-
boolean
$debug
sets the id of the form the field belongs to
void
setFrmId
( $aId)
sets a field as hidden
void
setHidden
([string $scope = 'form'])
sets the Form label text
void
setLabel
(string $aLabel)
-
string
$aLabel: text used in <td ...>$aLabel</td> column
void
setModuleKey
(string $modKey)
sets the owner form Object
void
setMyForm
(
&$frmObj, [
boolean $force =
False],
DBMS_FORM $frmObj)
sets the field name
void
setName
(string $aName)
sets the objectvars return value is used to raise an error by default True is returned at the moment
boolean
setObjectVars
(array $varArr, [boolean $debug = False])
-
array
$varArr
-
boolean
$debug
Redefined in descendants as:
sets the object vars from an other object
void
setObjVarsFrom
(
DBMS_FIELD $fld, [
boolean $debug =
False])
sets the orderNr of the field
void
setOrderNr
( $aNr, int $anr)
sets a field as shown
void
setShown
([string $scope = 'form'])
sets the field table (and load dbDesc again)
bool
setTable
(string $aTable, [string $colPreFix = ""], [bool $getDesc = True], [bool $debug = False])
-
string
$aTable
-
bool
$getDesc: load field Desc from table def
-
string
$colPreFix: is added to db column name
-
bool
$debug
sets the table alias
void
setTblAlias
(string $alias)
returns if the field is in list (does not check rights)
boolean
showInList
()