dolibarr 21.0.0-alpha
|
This class help to create item for class formSetup. More...
Public Member Functions | |
__construct ($confKey) | |
Constructor. | |
loadValueFromConf () | |
load conf value from databases | |
reloadValueFromConf () | |
Reload conf value from databases is an alias of loadValueFromConf. | |
saveConfValue () | |
Save const value based on htdocs/core/actions_setmoduleoptions.inc.php. | |
setSaveCallBack (callable $callBack) | |
Set an override function for saving data. | |
setValueFromPostCallBack (callable $callBack) | |
Set an override function for get data from post. | |
setValueFromPost () | |
Save const value based on htdocs/core/actions_setmoduleoptions.inc.php. | |
getHelpText () | |
Get help text or generate it. | |
getNameText () | |
Get field name text or generate it. | |
generateInputField () | |
generate input field | |
generateInputFieldText () | |
Generate default input field. | |
generateInputFieldTextarea () | |
generate input field for textarea | |
generateInputFieldHtml () | |
generate input field for html | |
generateInputFieldCategories () | |
generate input field for categories | |
generateInputFieldEmailTemplate () | |
generate input field for email template selector | |
generateInputFieldSecureKey () | |
generate input field for secure key | |
generateInputFieldPassword ($type='generic') | |
generate input field for a password | |
generateInputFieldMultiSelect () | |
generateInputFieldMultiSelect | |
generateInputFieldSelect () | |
generateInputFieldSelect | |
generateInputFieldSelectUser () | |
getType () | |
get the type : used for old module builder setup conf style conversion and tests because this two class will quickly evolve it's important to not set or get directly $this->type (will be protected) so this method exist to be sure we can manage evolution easily | |
setTypeFromTypeString ($type) | |
set the type from string : used for old module builder setup conf style conversion and tests because this two class will quickly evolve it's important to not set directly $this->type (will be protected) so this method exist to be sure we can manage evolution easily | |
setErrors ($errors) | |
Add error. | |
generateOutputField () | |
generateOutputField | |
generateOutputFieldMultiSelect () | |
generateOutputFieldMultiSelect | |
generateOutputFieldColor () | |
generateOutputFieldColor | |
generateInputFieldColor () | |
generateInputFieldColor | |
generateOutputFieldSelect () | |
generateOutputFieldSelect | |
generateOutputFieldSelectUser () | |
generateOutputFieldSelectUser | |
setAsString () | |
Set type of input as string. | |
setAsColor () | |
Set type of input as color. | |
setAsTextarea () | |
Set type of input as textarea. | |
setAsHtml () | |
Set type of input as html editor. | |
setAsEmailTemplate ($templateType) | |
Set type of input as emailtemplate selector. | |
setAsThirdpartyType () | |
Set type of input as thirdparty_type selector. | |
setAsYesNo () | |
Set type of input as Yes. | |
setAsSecureKey () | |
Set type of input as secure key. | |
setAsProduct () | |
Set type of input as product. | |
setAsCategory ($catType) | |
Set type of input as a category selector TODO add default value. | |
setAsTitle () | |
Set type of input as a simple title. | |
setAsMultiSelect ($fieldOptions) | |
Set type of input as a simple title. | |
setAsSelect ($fieldOptions) | |
Set type of input as a simple title. | |
setAsSelectUser () | |
Set type of input as a simple title. | |
setAsSelectBankAccount () | |
Set type of input as a simple title. | |
setAsPassword () | |
Set type of input as a password with dolibarr password rules apply. | |
setAsGenericPassword () | |
Set type of input as a generic password without dolibarr password rules (for external passwords for example). | |
Public Attributes | |
$rank = 0 | |
$saveCallBack | |
$setValueFromPostCallBack | |
This class help to create item for class formSetup.
Definition at line 592 of file html.formsetup.class.php.
FormSetupItem::__construct | ( | $confKey | ) |
Constructor.
string | $confKey | the conf key used in database |
Definition at line 682 of file html.formsetup.class.php.
References loadValueFromConf().
FormSetupItem::generateInputField | ( | ) |
generate input field
Definition at line 868 of file html.formsetup.class.php.
References type.
FormSetupItem::generateInputFieldCategories | ( | ) |
generate input field for categories
Definition at line 991 of file html.formsetup.class.php.
References img_picto(), and type.
FormSetupItem::generateInputFieldColor | ( | ) |
generateInputFieldColor
Definition at line 1346 of file html.formsetup.class.php.
References colorArrayToHex(), and colorStringToArray().
FormSetupItem::generateInputFieldEmailTemplate | ( | ) |
generate input field for email template selector
Definition at line 1013 of file html.formsetup.class.php.
References type.
FormSetupItem::generateInputFieldHtml | ( | ) |
generate input field for html
Definition at line 978 of file html.formsetup.class.php.
FormSetupItem::generateInputFieldMultiSelect | ( | ) |
generateInputFieldMultiSelect
Definition at line 1107 of file html.formsetup.class.php.
FormSetupItem::generateInputFieldPassword | ( | $type = 'generic' | ) |
generate input field for a password
string | $type | 'dolibarr' (dolibarr password rules apply) or 'generic' |
Definition at line 1071 of file html.formsetup.class.php.
References getDolGlobalString(), and GETPOST().
FormSetupItem::generateInputFieldSecureKey | ( | ) |
generate input field for secure key
Definition at line 1047 of file html.formsetup.class.php.
References dolJSToSetRandomPassword(), and GETPOST().
FormSetupItem::generateInputFieldSelect | ( | ) |
generateInputFieldSelect
Definition at line 1123 of file html.formsetup.class.php.
References img_picto().
FormSetupItem::generateInputFieldSelectUser | ( | ) |
Definition at line 1138 of file html.formsetup.class.php.
FormSetupItem::generateInputFieldText | ( | ) |
Generate default input field.
Definition at line 952 of file html.formsetup.class.php.
FormSetupItem::generateInputFieldTextarea | ( | ) |
generate input field for textarea
Definition at line 965 of file html.formsetup.class.php.
References dol_htmlentities().
FormSetupItem::generateOutputField | ( | ) |
generateOutputField
Definition at line 1196 of file html.formsetup.class.php.
References dol_nl2br(), and type.
FormSetupItem::generateOutputFieldColor | ( | ) |
generateOutputFieldColor
Definition at line 1331 of file html.formsetup.class.php.
References colorArrayToHex(), and colorStringToArray().
FormSetupItem::generateOutputFieldMultiSelect | ( | ) |
generateOutputFieldMultiSelect
Definition at line 1308 of file html.formsetup.class.php.
FormSetupItem::generateOutputFieldSelect | ( | ) |
FormSetupItem::generateOutputFieldSelectUser | ( | ) |
generateOutputFieldSelectUser
Definition at line 1375 of file html.formsetup.class.php.
FormSetupItem::getHelpText | ( | ) |
Get help text or generate it.
Definition at line 835 of file html.formsetup.class.php.
FormSetupItem::getNameText | ( | ) |
Get field name text or generate it.
Definition at line 848 of file html.formsetup.class.php.
References img_picto().
FormSetupItem::getType | ( | ) |
get the type : used for old module builder setup conf style conversion and tests because this two class will quickly evolve it's important to not set or get directly $this->type (will be protected) so this method exist to be sure we can manage evolution easily
Definition at line 1150 of file html.formsetup.class.php.
FormSetupItem::loadValueFromConf | ( | ) |
load conf value from databases
Definition at line 705 of file html.formsetup.class.php.
Referenced by __construct().
FormSetupItem::reloadValueFromConf | ( | ) |
Reload conf value from databases is an alias of loadValueFromConf.
Definition at line 723 of file html.formsetup.class.php.
FormSetupItem::saveConfValue | ( | ) |
Save const value based on htdocs/core/actions_setmoduleoptions.inc.php.
Definition at line 734 of file html.formsetup.class.php.
References dolibarr_set_const(), and type.
FormSetupItem::setAsCategory | ( | $catType | ) |
Set type of input as a category selector TODO add default value.
string | $catType | Type of category ('customer', 'supplier', 'contact', 'product', 'member'). Old mode (0, 1, 2, ...) is deprecated. |
Definition at line 1495 of file html.formsetup.class.php.
References type.
FormSetupItem::setAsColor | ( | ) |
Set type of input as color.
Definition at line 1404 of file html.formsetup.class.php.
References type.
FormSetupItem::setAsEmailTemplate | ( | $templateType | ) |
Set type of input as emailtemplate selector.
string | $templateType | email template type |
Definition at line 1438 of file html.formsetup.class.php.
References type.
FormSetupItem::setAsGenericPassword | ( | ) |
Set type of input as a generic password without dolibarr password rules (for external passwords for example).
Hide entry on display.
Definition at line 1585 of file html.formsetup.class.php.
References type.
FormSetupItem::setAsHtml | ( | ) |
Set type of input as html editor.
Definition at line 1426 of file html.formsetup.class.php.
References type.
FormSetupItem::setAsMultiSelect | ( | $fieldOptions | ) |
Set type of input as a simple title.
No data to store
array<string,string|array{id:string,label:string,color:string,picto:string,labelhtml:string}> | $fieldOptions A table of field options |
Definition at line 1519 of file html.formsetup.class.php.
References type.
FormSetupItem::setAsPassword | ( | ) |
Set type of input as a password with dolibarr password rules apply.
Hide entry on display.
Definition at line 1573 of file html.formsetup.class.php.
References type.
FormSetupItem::setAsProduct | ( | ) |
Set type of input as product.
Definition at line 1482 of file html.formsetup.class.php.
References type.
FormSetupItem::setAsSecureKey | ( | ) |
Set type of input as secure key.
Definition at line 1471 of file html.formsetup.class.php.
References type.
FormSetupItem::setAsSelect | ( | $fieldOptions | ) |
Set type of input as a simple title.
No data to store
array<string,string|array{id:string,label:string,color:string,picto:string,labelhtml:string}> | $fieldOptions A table of field options |
Definition at line 1535 of file html.formsetup.class.php.
References type.
FormSetupItem::setAsSelectBankAccount | ( | ) |
Set type of input as a simple title.
No data to store
Definition at line 1561 of file html.formsetup.class.php.
References type.
FormSetupItem::setAsSelectUser | ( | ) |
Set type of input as a simple title.
No data to store
Definition at line 1550 of file html.formsetup.class.php.
References type.
FormSetupItem::setAsString | ( | ) |
Set type of input as string.
Definition at line 1393 of file html.formsetup.class.php.
References type.
FormSetupItem::setAsTextarea | ( | ) |
Set type of input as textarea.
Definition at line 1415 of file html.formsetup.class.php.
References type.
FormSetupItem::setAsThirdpartyType | ( | ) |
Set type of input as thirdparty_type selector.
Definition at line 1449 of file html.formsetup.class.php.
References type.
FormSetupItem::setAsTitle | ( | ) |
Set type of input as a simple title.
No data to store
Definition at line 1506 of file html.formsetup.class.php.
References type.
FormSetupItem::setAsYesNo | ( | ) |
Set type of input as Yes.
Definition at line 1460 of file html.formsetup.class.php.
References type.
FormSetupItem::setErrors | ( | $errors | ) |
Add error.
string[] | string | $errors | the error text |
Definition at line 1177 of file html.formsetup.class.php.
FormSetupItem::setSaveCallBack | ( | callable | $callBack | ) |
Set an override function for saving data.
callable | $callBack | a callable function |
Definition at line 773 of file html.formsetup.class.php.
FormSetupItem::setTypeFromTypeString | ( | $type | ) |
set the type from string : used for old module builder setup conf style conversion and tests because this two class will quickly evolve it's important to not set directly $this->type (will be protected) so this method exist to be sure we can manage evolution easily
string | $type | Possible values based on old module builder setup : 'string', 'textarea', 'category:'.Categorie\TYPE_CUSTOMER', 'emailtemplate', 'thirdparty_type' |
Definition at line 1164 of file html.formsetup.class.php.
References type.
FormSetupItem::setValueFromPost | ( | ) |
Save const value based on htdocs/core/actions_setmoduleoptions.inc.php.
Definition at line 794 of file html.formsetup.class.php.
References GETPOST(), GETPOSTINT(), and type.
FormSetupItem::setValueFromPostCallBack | ( | callable | $callBack | ) |
Set an override function for get data from post.
callable | $callBack | a callable function |
Definition at line 784 of file html.formsetup.class.php.