Class TableUserField
-
TableAccess
-
TableUserField
Methods summary
public
|
#
__construct( Database & $database, integer $usf_id = 0 )
Constructor that will create an object of a recordset of the table adm_user_fields.
If the id is set than the specific user field will be loaded.
Constructor that will create an object of a recordset of the table adm_user_fields.
If the id is set than the specific user field will be loaded.
Parameters
- $database
- Object of the class Database. This should be the default global object @b $gDb.
- $usf_id
- The recordset of the user field with this id will be loaded. If id isn't set than an empty object of the table is created.
Overrides
|
public
|true
|
#
delete( )
Deletes the selected field and all references in other tables.
Also the gap in sequence will be closed. After that the class will be initialize.
Deletes the selected field and all references in other tables.
Also the gap in sequence will be closed. After that the class will be initialize.
Returns
|true true if no error occurred
Overrides
|
private
string
|
#
getNewNameIntern( string $name, integer $index )
diese rekursive Methode ermittelt fuer den uebergebenen Namen einen eindeutigen Namen
dieser bildet sich aus dem Namen in Grossbuchstaben und der naechsten freien Nummer (index)
Beispiel: 'Mitgliedsnummer' => 'MITGLIEDSNUMMER_2'
diese rekursive Methode ermittelt fuer den uebergebenen Namen einen eindeutigen Namen
dieser bildet sich aus dem Namen in Grossbuchstaben und der naechsten freien Nummer (index)
Beispiel: 'Mitgliedsnummer' => 'MITGLIEDSNUMMER_2'
Parameters
Returns
string
|
public
mixed
|
#
getValue( string $columnName, string $format = '' )
Get the value of a column of the database table.
If the value was manipulated before with @b setValue than the manipulated value is returned.
Get the value of a column of the database table.
If the value was manipulated before with @b setValue than the manipulated value is returned.
Parameters
- $columnName
- The name of the database column whose value should be read
- $format
- For column @c usf_value_list the following format is accepted: @n
Returns
mixed Returns the value of the database column.
If the value was manipulated before with @b setValue than the manipulated value is returned.
B
database returns database value of usf_value_list; @n
text extract only text from usf_value_list, image infos will be ignored @n
For date or timestamp columns the format should be the date/time format e.g. @b d.m.Y = '02.04.2011' @n
For text columns the format can be @b database that would be the database value without any transformations
Overrides
|
public
|
#
moveSequence( string $mode )
das Feld wird um eine Position in der Reihenfolge verschoben
das Feld wird um eine Position in der Reihenfolge verschoben
Parameters
|
public
boolean
|
#
save( boolean $updateFingerPrint = true )
Save all changed columns of the recordset in table of database. Therefore the class remembers if it's
a new record or if only an update is necessary. The update statement will only update
the changed columns. If the table has columns for creator or editor than these column
with their timestamp will be updated.
For new records the name intern will be set per default.
Save all changed columns of the recordset in table of database. Therefore the class remembers if it's
a new record or if only an update is necessary. The update statement will only update
the changed columns. If the table has columns for creator or editor than these column
with their timestamp will be updated.
For new records the name intern will be set per default.
Parameters
- $updateFingerPrint
- Default @b true. Will update the creator or editor of the recordset if table has columns like @b usr_id_create or @b usr_id_changed
Returns
boolean If an update or insert into the database was done then return true, otherwise false.
Overrides
|
public
boolean
|
#
setValue( string $columnName, mixed $newValue, boolean $checkValue = true )
Set a new value for a column of the database table.
The value is only saved in the object. You must call the method @b save to store the new value to the database
Set a new value for a column of the database table.
The value is only saved in the object. You must call the method @b save to store the new value to the database
Parameters
- $columnName
- The name of the database column whose value should get a new value
- $newValue
- The new value that should be stored in the database field
- $checkValue
- The value will be checked if it's valid. If set to @b false than the value will not be checked.
Returns
boolean Returns @b true if the value is stored in the current object and @b false if a check failed
Overrides
|
__sleep()
,
clear()
,
connectAdditionalTable()
,
countAllRecords()
,
hasColumnsValueChanged()
,
isNewRecord()
,
readData()
,
readDataByColumns()
,
readDataById()
,
setArray()
,
setDatabase()