|
dolibarr 23.0.3
|
Class to pricecy field (price with currency) More...


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. | |
| getPriceAndCurrencyFromValue ($fieldInfos, $value) | |
| Get price and currency from value. | |
| getPriceAndCurrencyAliasAndField ($fieldInfos, $key) | |
| Get alias and field name in table for price and currency. | |
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. | |
Class to pricecy field (price with currency)
Definition at line 30 of file pricecyfield.class.php.
| PricecyField::getInputCss | ( | $fieldInfos, | |
| $moreCss = '', | |||
| $defaultCss = '' ) |
Get input CSS.
| FieldInfos | $fieldInfos | Properties of the field |
| string | $moreCss | Value for css to define style/length of field. |
| string | $defaultCss | Default value for css to define style/length of field. |
Reimplemented from CommonField.
Definition at line 131 of file pricecyfield.class.php.
Referenced by printInputField(), and printInputSearchField().
| PricecyField::getPostFieldValue | ( | $fieldInfos, | |
| $key, | |||
| $defaultValue = null, | |||
| $keyPrefix = '', | |||
| $keySuffix = '' ) |
Get field value from GET/POST.
| FieldInfos | $fieldInfos | Properties of the field |
| string | $key | Key of field |
| mixed | $defaultValue | Preselected 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 | $keyPrefix | Prefix string to add into name and id of field (can be used to avoid duplicate names) |
| string | $keySuffix | Suffix string to add into name and id of field (can be used to avoid duplicate names) |
Reimplemented from CommonField.
Definition at line 192 of file pricecyfield.class.php.
References GETPOST(), and price2num().
| PricecyField::getPostSearchFieldValue | ( | $fieldInfos, | |
| $key, | |||
| $defaultValue = null, | |||
| $keyPrefix = '', | |||
| $keySuffix = '' ) |
Get search field value from GET/POST.
| FieldInfos | $fieldInfos | Properties of the field |
| string | $key | Key of field |
| mixed | $defaultValue | Preselected 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 | $keyPrefix | Prefix string to add into name and id of field (can be used to avoid duplicate names) |
| string | $keySuffix | Suffix string to add into name and id of field (can be used to avoid duplicate names) |
Reimplemented from CommonField.
Definition at line 216 of file pricecyfield.class.php.
References GETPOST().
| PricecyField::getPriceAndCurrencyAliasAndField | ( | $fieldInfos, | |
| $key ) |
Get alias and field name in table for price and currency.
| FieldInfos | $fieldInfos | Properties of the field |
| string | $key | Key of field |
Definition at line 297 of file pricecyfield.class.php.
Referenced by printInputSearchField(), and sqlFilterSearchField().
| PricecyField::getPriceAndCurrencyFromValue | ( | $fieldInfos, | |
| $value ) |
Get price and currency from value.
| FieldInfos | $fieldInfos | Properties of the field |
| string | $value | Value in memory is a php string like '0.01:EUR' |
Definition at line 270 of file pricecyfield.class.php.
References CommonField\isEmptyValue().
Referenced by printInputField(), printInputSearchField(), printOutputField(), and verifyFieldValue().
| PricecyField::printInputField | ( | $fieldInfos, | |
| $key, | |||
| $value, | |||
| $keyPrefix = '', | |||
| $keySuffix = '', | |||
| $moreCss = '', | |||
| $moreAttrib = '' ) |
Return HTML string to put an input field into a page.
| FieldInfos | $fieldInfos | Properties of the field |
| string | $key | Key of field |
| mixed | $value | Preselected 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 | $keyPrefix | Prefix string to add into name and id of field (can be used to avoid duplicate names) |
| string | $keySuffix | Suffix string to add into name and id of field (can be used to avoid duplicate names) |
| string | $moreCss | Value for css to define style/length of field. |
| string | $moreAttrib | To add more attributes on html input tag |
Reimplemented from CommonField.
Definition at line 84 of file pricecyfield.class.php.
References getInputCss(), getPriceAndCurrencyFromValue(), CommonField\isEmptyValue(), and price().
| PricecyField::printInputSearchField | ( | $fieldInfos, | |
| $key, | |||
| $value, | |||
| $keyPrefix = '', | |||
| $keySuffix = '', | |||
| $moreCss = '', | |||
| $moreAttrib = '' ) |
Return HTML string to put an input search field into a page.
| FieldInfos | $fieldInfos | Properties of the field |
| string | $key | Key of field |
| mixed | $value | Preselected 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 | $keyPrefix | Prefix string to add into name and id of field (can be used to avoid duplicate names) |
| string | $keySuffix | Suffix string to add into name and id of field (can be used to avoid duplicate names) |
| string | $moreCss | Value for css to define style/length of field. |
| string | $moreAttrib | To add more attributes on html input tag |
Reimplemented from CommonField.
Definition at line 50 of file pricecyfield.class.php.
References getInputCss(), getPriceAndCurrencyAliasAndField(), and getPriceAndCurrencyFromValue().
| PricecyField::printOutputField | ( | $fieldInfos, | |
| $key, | |||
| $value, | |||
| $keyPrefix = '', | |||
| $keySuffix = '', | |||
| $moreCss = '', | |||
| $moreAttrib = '' ) |
Return HTML string to show a field into a page.
| FieldInfos | $fieldInfos | Properties of the field |
| string | $key | Key of field |
| mixed | $value | Preselected 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 | $keyPrefix | Prefix string to add into name and id of field (can be used to avoid duplicate names) |
| string | $keySuffix | Suffix string to add into name and id of field (can be used to avoid duplicate names) |
| string | $moreCss | Value for css to define style/length of field. |
| string | $moreAttrib | To add more attributes on html input tag |
Reimplemented from CommonField.
Definition at line 112 of file pricecyfield.class.php.
References getDolGlobalInt(), getPriceAndCurrencyFromValue(), CommonField\isEmptyValue(), and price().
| PricecyField::sqlFilterSearchField | ( | $fieldInfos, | |
| $key, | |||
| $value ) |
Get sql filter for search field.
| FieldInfos | $fieldInfos | Properties of the field |
| string | $key | Key of field |
| mixed | $value | Preselected 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) |
Reimplemented from CommonField.
Definition at line 241 of file pricecyfield.class.php.
References getPriceAndCurrencyAliasAndField(), and natural_search().
| PricecyField::verifyFieldValue | ( | $fieldInfos, | |
| $key, | |||
| $value ) |
Verify if the field value is valid.
| FieldInfos | $fieldInfos | Properties of the field |
| string | $key | Key of field |
| mixed | $value | Value 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) |
Reimplemented from CommonField.
Definition at line 145 of file pricecyfield.class.php.
References getPriceAndCurrencyFromValue(), and CommonField\isEmptyValue().
Referenced by verifyPostFieldValue().
| PricecyField::verifyPostFieldValue | ( | $fieldInfos, | |
| $key, | |||
| $keyPrefix = '', | |||
| $keySuffix = '' ) |
Verify if the field value from GET/POST is valid.
| FieldInfos | $fieldInfos | Properties of the field |
| string | $key | Key of field |
| string | $keyPrefix | Prefix string to add into name and id of field (can be used to avoid duplicate names) |
| string | $keySuffix | Suffix string to add into name and id of field (can be used to avoid duplicate names) |
Reimplemented from CommonField.
Definition at line 172 of file pricecyfield.class.php.
References GETPOST(), and verifyFieldValue().