dolibarr 23.0.3
CommonSelectField Class Reference

Class to common select field. More...

Inheritance diagram for CommonSelectField:
Collaboration diagram for CommonSelectField:

Public Member Functions

 getOptions ($fieldInfos, $key, $addEmptyValue=false, $reload=false)
 Get list of options.
 
- Public Member Functions inherited from CommonField
 __construct ($db)
 Constructor.
 
 clearErrors ()
 clear errors
 
 errorsToString ($separator=', ')
 Method to output saved errors.
 
 isEmptyValue ($fieldInfos, $value, $emptyValues=null)
 Check if the value is deemed as empty.
 
 printInputSearchField ($fieldInfos, $key, $value, $keyPrefix='', $keySuffix='', $moreCss='', $moreAttrib='')
 Return HTML string to put an input search field into a page.
 
 printInputField ($fieldInfos, $key, $value, $keyPrefix='', $keySuffix='', $moreCss='', $moreAttrib='')
 Return HTML string to put an input field into a page.
 
 printOutputField ($fieldInfos, $key, $value, $keyPrefix='', $keySuffix='', $moreCss='', $moreAttrib='')
 Return HTML string to show a field into a page.
 
 getInputCss ($fieldInfos, $moreCss='', $defaultCss='minwidth400')
 Get input CSS.
 
 verifyFieldValue ($fieldInfos, $key, $value)
 Verify if the field value is valid.
 
 verifyPostFieldValue ($fieldInfos, $key, $keyPrefix='', $keySuffix='')
 Verify if the field value from GET/POST is valid.
 
 getPostFieldValue ($fieldInfos, $key, $defaultValue=null, $keyPrefix='', $keySuffix='')
 Get field value from GET/POST.
 
 getPostSearchFieldValue ($fieldInfos, $key, $defaultValue=null, $keyPrefix='', $keySuffix='')
 Get search field value from GET/POST.
 
 sqlFilterSearchField ($fieldInfos, $key, $value)
 Get sql filter for search field.
 

Additional Inherited Members

- Static Public Member Functions inherited from CommonField
static setForm (&$form)
 Set form used for print the field.
 
static setValidator (&$validator)
 Set validator used for check the field value.
 

Detailed Description

Class to common select field.

Definition at line 30 of file commonselectfield.class.php.

Member Function Documentation

◆ getOptions()

CommonSelectField::getOptions ( $fieldInfos,
$key,
$addEmptyValue = false,
$reload = false )

Get list of options.

Parameters
FieldInfos$fieldInfosArray of properties for field to show
string$keyKey of field
bool$addEmptyValueAdd also empty value if needed
bool$reloadForce reload options
Returns
array<string,array{label:string,parent:string}>

Reimplemented in CheckboxField, RadioField, and SelectField.

Definition at line 46 of file commonselectfield.class.php.


The documentation for this class was generated from the following file: