dolibarr 24.0.0-beta
ChkbxlstField Class Reference

Class to chkbxlst field (multiselect) More...

Inheritance diagram for ChkbxlstField:
Collaboration diagram for ChkbxlstField:

Public Member Functions

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

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 chkbxlst field (multiselect)

Definition at line 31 of file chkbxlstfield.class.php.

Member Function Documentation

◆ getInputCss()

ChkbxlstField::getInputCss ( $fieldInfos,
$moreCss = '',
$defaultCss = '' )

Get input CSS.

Parameters
FieldInfos$fieldInfosProperties of the field
string$moreCssValue for css to define style/length of field.
string$defaultCssDefault value for css to define style/length of field.
Returns
string
See also
self\printInputSearchField(), self\printInputField()

Reimplemented from CommonField.

Definition at line 159 of file chkbxlstfield.class.php.

Referenced by printInputField(), and printInputSearchField().

◆ getOptions()

ChkbxlstField::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}>

Reimplemented from CommonSellistField.

Definition at line 292 of file chkbxlstfield.class.php.

Referenced by printInputField(), printInputSearchField(), and printOutputField().

◆ getPostFieldValue()

ChkbxlstField::getPostFieldValue ( $fieldInfos,
$key,
$defaultValue = null,
$keyPrefix = '',
$keySuffix = '' )

Get field value from GET/POST.

Parameters
FieldInfos$fieldInfosProperties of the field
string$keyKey of field
mixed$defaultValuePreselected value to show (for date type it must be in timestamp format, for amount or price it must be a php numeric value, for array type must be array)
string$keyPrefixPrefix string to add into name and id of field (can be used to avoid duplicate names)
string$keySuffixSuffix string to add into name and id of field (can be used to avoid duplicate names)
Returns
mixed
See also
self\printInputField()

Reimplemented from CommonField.

Definition at line 219 of file chkbxlstfield.class.php.

References GETPOST().

◆ getPostSearchFieldValue()

ChkbxlstField::getPostSearchFieldValue ( $fieldInfos,
$key,
$defaultValue = null,
$keyPrefix = '',
$keySuffix = '' )

Get search field value from GET/POST.

Parameters
FieldInfos$fieldInfosProperties of the field
string$keyKey of field
mixed$defaultValuePreselected value to show (for date type it must be in timestamp format, for amount or price it must be a php numeric value, for array type must be array)
string$keyPrefixPrefix string to add into name and id of field (can be used to avoid duplicate names)
string$keySuffixSuffix string to add into name and id of field (can be used to avoid duplicate names)
Returns
mixed
See also
self\printInputSearchField()

Reimplemented from CommonField.

Definition at line 246 of file chkbxlstfield.class.php.

References GETPOST().

◆ printInputField()

ChkbxlstField::printInputField ( $fieldInfos,
$key,
$value,
$keyPrefix = '',
$keySuffix = '',
$moreCss = '',
$moreAttrib = '' )

Return HTML string to put an input field into a page.

Parameters
FieldInfos$fieldInfosProperties of the field
string$keyKey of field
mixed$valuePreselected value to show (for date type it must be in timestamp format, for amount or price it must be a php numeric value, for array type must be array)
string$keyPrefixPrefix string to add into name and id of field (can be used to avoid duplicate names)
string$keySuffixSuffix string to add into name and id of field (can be used to avoid duplicate names)
string$moreCssValue for css to define style/length of field.
string$moreAttribTo add more attributes on html input tag
Returns
string

Reimplemented from CommonField.

Definition at line 84 of file chkbxlstfield.class.php.

References $conf, getDolGlobalString(), getInputCss(), getOptions(), and CommonField\isEmptyValue().

◆ printInputSearchField()

ChkbxlstField::printInputSearchField ( $fieldInfos,
$key,
$value,
$keyPrefix = '',
$keySuffix = '',
$moreCss = '',
$moreAttrib = '' )

Return HTML string to put an input search field into a page.

Parameters
FieldInfos$fieldInfosProperties of the field
string$keyKey of field
mixed$valuePreselected value to show (for date type it must be in timestamp format, for amount or price it must be a php numeric value, for array type must be array)
string$keyPrefixPrefix string to add into name and id of field (can be used to avoid duplicate names)
string$keySuffixSuffix string to add into name and id of field (can be used to avoid duplicate names)
string$moreCssValue for css to define style/length of field.
string$moreAttribTo add more attributes on html input tag
Returns
string

Reimplemented from CommonField.

Definition at line 51 of file chkbxlstfield.class.php.

References $conf, getDolGlobalString(), getInputCss(), getOptions(), and CommonField\isEmptyValue().

◆ printOutputField()

ChkbxlstField::printOutputField ( $fieldInfos,
$key,
$value,
$keyPrefix = '',
$keySuffix = '',
$moreCss = '',
$moreAttrib = '' )

Return HTML string to show a field into a page.

Parameters
FieldInfos$fieldInfosProperties of the field
string$keyKey of field
mixed$valuePreselected value to show (for date type it must be in timestamp format, for amount or price it must be a php numeric value, for array type must be array)
string$keyPrefixPrefix string to add into name and id of field (can be used to avoid duplicate names)
string$keySuffixSuffix string to add into name and id of field (can be used to avoid duplicate names)
string$moreCssValue for css to define style/length of field.
string$moreAttribTo add more attributes on html input tag
Returns
string

Reimplemented from CommonField.

Definition at line 113 of file chkbxlstfield.class.php.

References $c, getOptions(), CommonSellistField\getOptionsParams(), img_object(), and CommonField\isEmptyValue().

◆ sqlFilterSearchField()

ChkbxlstField::sqlFilterSearchField ( $fieldInfos,
$key,
$value )

Get sql filter for search field.

Parameters
FieldInfos$fieldInfosProperties of the field
string$keyKey of field
mixed$valuePreselected value to show (for date type it must be in timestamp format, for amount or price it must be a php numeric value, for array type must be array)
Returns
string
See also
self\printInputSearchField(), self\getPostSearchFieldValue()

Reimplemented from CommonField.

Definition at line 268 of file chkbxlstfield.class.php.

◆ verifyFieldValue()

ChkbxlstField::verifyFieldValue ( $fieldInfos,
$key,
$value )

Verify if the field value is valid.

Parameters
FieldInfos$fieldInfosProperties of the field
string$keyKey of field
mixed$valueValue to check (for date type it must be in timestamp format, for amount or price it must be a php numeric value, for array type must be array)
Returns
bool
See also
self\printInputField()

Reimplemented from CommonField.

Definition at line 173 of file chkbxlstfield.class.php.

References CommonSellistField\getOptionsParams(), and CommonField\isEmptyValue().

Referenced by verifyPostFieldValue().

◆ verifyPostFieldValue()

ChkbxlstField::verifyPostFieldValue ( $fieldInfos,
$key,
$keyPrefix = '',
$keySuffix = '' )

Verify if the field value from GET/POST is valid.

Parameters
FieldInfos$fieldInfosProperties of the field
string$keyKey of field
string$keyPrefixPrefix string to add into name and id of field (can be used to avoid duplicate names)
string$keySuffixSuffix string to add into name and id of field (can be used to avoid duplicate names)
Returns
bool
See also
self\printInputField()

Reimplemented from CommonField.

Definition at line 200 of file chkbxlstfield.class.php.

References GETPOST(), and verifyFieldValue().


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