modules/Import/ImportFieldSanitize.php
\ImportFieldSanitize
Package:
Properties

$addRelatedBean= 'false'
true if we will create related beans during the sanitize process
Default value
falseDetails- 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
)
:
stringChecks 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
)
:
stringValidate 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
)
:
stringValidate 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
)
:
stringAdded 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
)
:
stringValidate 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
)
:
stringValidate 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 |