dolibarr 23.0.3
CommonSellistField Class Reference

Class to common sellist field. More...

Inheritance diagram for CommonSellistField:
Collaboration diagram for CommonSellistField:

Public Member Functions

 getOptionsParams ($options)
 Get all parameters in the options.
 
 getSqlFieldInfo ($fullField)
 Get sql info of the full field.
 
 getOptions ($fieldInfos, $key, $addEmptyValue=false, $reload=false, $selectedValues=array())
 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 sellist field.

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

Member Function Documentation

◆ getOptions()

CommonSellistField::getOptions ( $fieldInfos,
$key,
$addEmptyValue = false,
$reload = false,
$selectedValues = array() )

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
string|array<int,string>$selectedValues Only selected values
Returns
array<string,array{label:string,parent:string}>|null Return null if error

Reimplemented in ChkbxlstField, and SellistField.

Definition at line 202 of file commonsellistfield.class.php.

References $object, dol_syslog(), forgeSQLFromUniversalSearchCriteria(), getDolGlobalInt(), getDolGlobalString(), and getOptionsParams().

◆ getOptionsParams()

CommonSellistField::getOptionsParams ( $options)

Get all parameters in the options.

Parameters
array<string,mixed>$options Options of the field
Returns
array{all:string,tableName:string,labelFullFields:string[],labelFields:string[],labelAlias:string[],keyField:string,parentName:string,parentFullField:string,parentField:string,parentAlias:string,filter:string,categoryType:string,categoryRoots:string,sortField:string}

Definition at line 73 of file commonsellistfield.class.php.

References getSqlFieldInfo().

Referenced by getOptions(), ChkbxlstField\printOutputField(), SellistField\printOutputField(), ChkbxlstField\verifyFieldValue(), and SellistField\verifyFieldValue().

◆ getSqlFieldInfo()

CommonSellistField::getSqlFieldInfo ( $fullField)

Get sql info of the full field.

Parameters
string$fullFieldFull field (ex: p.test AS label or f(a,b,c) AS label)
Returns
array{field:string,alias:string}

Definition at line 172 of file commonsellistfield.class.php.

Referenced by getOptionsParams().


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