modules/Import/ImportFieldSanitize.php
\ImportFieldSanitize
Package:
Properties
$addRelatedBean= 'false'
true if we will create related beans during the sanitize process
Default value
false
Details- Type
- n/a
$createdBeans= 'array()'
static
array of modules/users_last_import ids pairs that are created in this class needs to be reset after the row is imported
Default value
array()
Details- Type
- n/a
Methods
__call(
\$value $name, \$vardef $params
)
:
string
Checks the SugarField defintion for an available santization method.
Parameters
Returns
Name | Type | Description |
---|---|---|
$name | \$value | string |
$params | \$vardef | array |
Type | Description |
---|---|
string | sanitized and validated value on success, bool false on failure |
date(
\$value $value, \$vardef $vardef, \$focus $focus
)
:
string
Validate date fields
Parameters
Returns
Name | Type | Description |
---|---|---|
$value | \$value | string |
$vardef | \$vardef | array |
$focus | \$focus | object bean of the module we're importing into |
Type | Description |
---|---|
string | sanitized and validated value on success, bool false on failure |
email(
\$value $value, \$vardef $vardef
)
:
string
Validate email fields
Parameters
Returns
Name | Type | Description |
---|---|---|
$value | \$value | string |
$vardef | \$vardef | array |
Type | Description |
---|---|
string | sanitized and validated value on success, bool false on failure |
isValidTimeDate(
\$value $value, \$format $format
)
:
string
Added to handle Bug 24104, to make sure the date/time value is correct ( i.e. 20/20/2008 doesn't work )
Parameters
Returns
Name | Type | Description |
---|---|---|
$value | \$value | string |
$format | \$format | string |
Type | Description |
---|---|
string | sanitized and validated value on success, bool false on failure |
synctooutlook(
\$value $value, \$vardef $vardef, \$bad_names $bad_names
)
:
string
Validate sync_to_outlook field
Parameters
Returns
Name | Type | Description |
---|---|---|
$value | \$value | string |
$vardef | \$vardef | array |
$bad_names | \$bad_names | array used to return list of bad users/teams in $value |
Type | Description |
---|---|
string | sanitized and validated value on success, bool false on failure |
time(
\$value $value, \$vardef $vardef, \$focus $focus
)
:
string
Validate time fields
Parameters
Returns
Name | Type | Description |
---|---|---|
$value | \$value | string |
$vardef | \$vardef | array |
$focus | \$focus | object bean of the module we're importing into |
Type | Description |
---|---|
string | sanitized and validated value on success, bool false on failure |