dolibarr 24.0.0-beta
IpField Class Reference

Class to ip field. More...

Inheritance diagram for IpField:
Collaboration diagram for IpField:

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.
 
- 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 ip field.

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

Member Function Documentation

◆ getInputCss()

IpField::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 107 of file ipfield.class.php.

Referenced by printInputField(), and printInputSearchField().

◆ getPostFieldValue()

IpField::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 165 of file ipfield.class.php.

References GETPOST().

◆ getPostSearchFieldValue()

IpField::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 190 of file ipfield.class.php.

References GETPOST().

◆ printInputField()

IpField::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 70 of file ipfield.class.php.

References getInputCss().

◆ printInputSearchField()

IpField::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 50 of file ipfield.class.php.

References getInputCss().

◆ printOutputField()

IpField::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 93 of file ipfield.class.php.

References dol_print_ip(), and CommonField\isEmptyValue().

◆ sqlFilterSearchField()

IpField::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 212 of file ipfield.class.php.

References CommonField\isEmptyValue(), and natural_search().

◆ verifyFieldValue()

IpField::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 121 of file ipfield.class.php.

References CommonField\isEmptyValue().

◆ verifyPostFieldValue()

IpField::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 149 of file ipfield.class.php.


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