Class ProfileFields
License: GNU General Public License v2.0 only **********************************************************************************************
Brief:
Reads the user fields structure out of database and give access to it
When an object is created than the actual profile fields structure will be read. In addition to this structure you can read the user values for all fields if you call @c readUserData . If you read field values than you will get the formated output. It's also possible to set user data and save this data to the database
Class: ProfileFields
Located at profilefields.php
Methods summary
public
|
#
__construct(
constructor that will initialize variables and read the profile field structure |
public
string[]
|
|
public
|
#
clearUserData( )
user data of all profile fields will be initialized the fields array will not be renewed |
public
mixed
|
#
getProperty( string $fieldNameIntern, string $column, string $format = '' )
returns for a fieldname intern (usf_name_intern) the value of the column from table adm_user_fields |
public
string
|
#
getPropertyById( integer $fieldId, string $column, string $format = '' )
returns for field id (usf_id) the value of the column from table adm_user_fields |
public
string
|
#
getHtmlValue( string $fieldNameIntern, string|integer $value, string|integer $value2 = '' )
Returns the value of the field in html format with consideration of all layout parameters |
public
string|integer|boolean
|
#
getValue( string $fieldNameIntern, string $format = '' )
Returns the user value for this column @n format = 'd.m.Y' : a date or timestamp field accepts the format of the PHP date() function @n format = 'html' : returns the value in html-format if this is necessary for that field type @n format = 'database' : returns the value that is stored in database with no format applied |
public
|
#
noValueCheck( )
If this method is called than all further calls of method @b setValue will not check the values. The values will be stored in database without any inspections ! |
public
|
#
readProfileFields( integer $organizationId )
Reads the profile fields structure out of database table @b adm_user_fields and adds an object for each field structure to the @b mProfileFields array. |
public
|
#
readUserData( integer $userId, integer $organizationId )
Reads the user data of all profile fields out of database table @b adm_user_data and adds an object for each field data to the @b mUserData array. If profile fields structure wasn't read, this will be done before. |
public
|
|
public
|
#
setDatabase(
Set the database object for communication with the database of this class. |
public
boolean
|
Properties summary
public
array
|
$mProfileFields
|
#
array()
|
public
array
|
$mUserData
|
#
array()
|
protected
|
$mUserId
|
|
protected
|
$mDb
|
|
protected
|
$noValueCheck
|
|
public
|
$columnsValueChanged
|