Class InventoryFields
License: GNU General Public License v2.0 only **********************************************************************************************
Brief:
Reads the Inventory fields structure out of database and give access to it
When an object is created than the actual inventory fields structure will be read. In addition to this structure you can read the item values for all fields if you call @c readItemData . If you read field values than you will get the formated output. It's also possible to set item data and save this data to the database
Class: InventoryFields
Located at inventoryfields.php
Methods summary
public
|
#
__construct(
constructor that will initialize variables and read the inventory field structure |
public
|
#
clearInventoryData( )
item data of all inventory fields will be initialized the fields array will not be renewed |
public
|
#
getProperty( string $fieldNameIntern, string $column, string $format = '' )
returns for a fieldname intern (inf_name_intern) the value of the column from table adm_user_fields |
public
|
#
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, integer $value2 = null )
Returns the value of the field in html format with consideration of all layout parameters |
public
mixed
|
#
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
|
#
readInventoryFields( 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 mInventoryFields array. |
public
|
#
readInventoryData( integer $itemId, 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 mInventoryData array. If profile fields structure wasn't read, this will be done before. |
public
|
|
public
boolean
|
Properties summary
public
array
|
$mInventoryFields
|
#
array()
|
public
array
|
$mInventoryData
|
#
array()
|
protected
|
$mItemId
|
|
public
|
$mDb
|
|
protected
|
$noValueCheck
|
|
public
|
$columnsValueChanged
|