include/SugarFields/Fields/Download/SugarFieldDownload.php
\SugarFieldDownload
SugarFieldBase translates and displays fields from a vardef definition into different formats including DetailView, ListView, EditView. It also provides Search Inputs and database queries to handle searching
- Parent(s)
- \SugarFieldBase
Properties

$hasButton= 'false'
falseDetails- Type
- n/a
- Inherited_from
- \SugarFieldBase::$$hasButton

$ss= ''
- Type
- n/a
- Inherited_from
- \SugarFieldBase::$$ss
Methods

SugarFieldBase(
$type
)
:
void| Name | Type | Description |
|---|---|---|
| $type |

displayFromFunc(
$displayType, $parentFieldArray, $vardef, $displayParams, $tabindex
=
0
)
:
void| Name | Type | Description |
|---|---|---|
| $displayType | ||
| $parentFieldArray | ||
| $vardef | ||
| $displayParams | ||
| $tabindex |

fetch(
$path
)
:
void| Name | Type | Description |
|---|---|---|
| $path |

findTemplate(
$view
)
:
void| Name | Type | Description |
|---|---|---|
| $view |

formatField(
$rawField, $vardef
)
:
void| Name | Type | Description |
|---|---|---|
| $rawField | ||
| $vardef |

getAccessKey(
$vardef, $fieldType
=
null, $module
=
null
)
:
void| Name | Type | Description |
|---|---|---|
| $vardef | ||
| $fieldType | ||
| $module |

getChangeLogSmarty(
$parentFieldArray, $vardef, $displayParams, $tabindex
)
:
void| Name | Type | Description |
|---|---|---|
| $parentFieldArray | ||
| $vardef | ||
| $displayParams | ||
| $tabindex |

getDetailViewSmarty(
\parentFieldArray $parentFieldArray, \vardef $vardef, \displayParam $displayParams, $tabindex
)
:
voidReturns a smarty template for the DetailViews
| Name | Type | Description |
|---|---|---|
| $parentFieldArray | \parentFieldArray | string name of the variable in the parent template for the bean's data |
| $vardef | \vardef | vardef field defintion |
| $displayParams | \displayParam | parameters for display available paramters are: * labelSpan - column span for the label * fieldSpan - column span for the field |
| $tabindex |

getEditViewSmarty(
$parentFieldArray, $vardef, $displayParams, $tabindex
)
:
void| Name | Type | Description |
|---|---|---|
| $parentFieldArray | ||
| $vardef | ||
| $displayParams | ||
| $tabindex |

getEmailTemplateValue(
$inputField, $vardef, $context
=
null
)
:
void| Name | Type | Description |
|---|---|---|
| $inputField | ||
| $vardef | ||
| $context |

getImportViewSmarty(
$parentFieldArray, $vardef, $displayParams, $tabindex
)
:
void| Name | Type | Description |
|---|---|---|
| $parentFieldArray | ||
| $vardef | ||
| $displayParams | ||
| $tabindex |

getListViewSmarty(
$parentFieldArray, $vardef, $displayParams, $col
)
:
void| Name | Type | Description |
|---|---|---|
| $parentFieldArray | ||
| $vardef | ||
| $displayParams | ||
| $col |

getPopupViewSmarty(
$parentFieldArray, $vardef, $displayParams, $tabindex
)
:
void| Name | Type | Description |
|---|---|---|
| $parentFieldArray | ||
| $vardef | ||
| $displayParams | ||
| $tabindex |

getSearchInput(
\$key $key
=
'', \$args $args
=
array()
)
:
\$value
This function allows the SugarFields to handle returning the search input value given arguments (typically from $_REQUEST/$_POST) and a search string.
| Name | Type | Description |
|---|---|---|
| $key | \$key | String value of key to search for |
| $args | \$args | Mixed value containing haystack to search for value in |
| Type | Description |
|---|---|
| \$value | Mixed value that the SugarField should return |

getSearchViewSmarty(
$parentFieldArray, $vardef, $displayParams, $tabindex
)
:
void| Name | Type | Description |
|---|---|---|
| $parentFieldArray | ||
| $vardef | ||
| $displayParams | ||
| $tabindex |

getSearchWhereValue(
\$value $value
)
:
Mixed
Checks and returns a sane value based on the field type that can be used when building the where clause in a search form.
| Name | Type | Description |
|---|---|---|
| $value | \$value | Mixed value being searched on |
| Type | Description |
|---|---|
| Mixed | the value for the where clause used in search |

getSmartyView(
$parentFieldArray, $vardef, $displayParams, $tabindex
=
-1, $view
)
:
void| Name | Type | Description |
|---|---|---|
| $parentFieldArray | ||
| $vardef | ||
| $displayParams | ||
| $tabindex | ||
| $view |

getWirelessDetailViewSmarty(
$parentFieldArray, $vardef, $displayParams, $tabindex
)
:
void| Name | Type | Description |
|---|---|---|
| $parentFieldArray | ||
| $vardef | ||
| $displayParams | ||
| $tabindex |

getWirelessEditViewSmarty(
$parentFieldArray, $vardef, $displayParams, $tabindex
)
:
void| Name | Type | Description |
|---|---|---|
| $parentFieldArray | ||
| $vardef | ||
| $displayParams | ||
| $tabindex |

getWirelessListViewSmarty(
$parentFieldArray, $vardef, $displayParams, $tabindex
)
:
void| Name | Type | Description |
|---|---|---|
| $parentFieldArray | ||
| $vardef | ||
| $displayParams | ||
| $tabindex |

getWirelessSmartyView(
$parentFieldArray, $vardef, $displayParams, $tabindex
=
-1, $view
)
:
void| Name | Type | Description |
|---|---|---|
| $parentFieldArray | ||
| $vardef | ||
| $displayParams | ||
| $tabindex | ||
| $view |

importSanitize(
\$value $value, \$vardefs $vardef, \$focus $focus, \$settings $settings
)
:
stringHandles import field sanitizing for an field type
Inherited from: \SugarFieldBase::importSanitize()| Name | Type | Description |
|---|---|---|
| $value | \$value | string value to be sanitized |
| $vardef | \$vardefs | array |
| $focus | \$focus | SugarBean object |
| $settings | \$settings | ImportFieldSanitize object |
| Type | Description |
|---|---|
| string | sanitized value or boolean false if there's a problem with the value |

isRangeSearchView(
array $vardef
)
:
booleanisRangeSearchView This method helps determine whether or not to display the range search view code for the sugar field
Inherited from: \SugarFieldBase::isRangeSearchView()| Name | Type | Description |
|---|---|---|
| $vardef | array | entry representing the sugar field's definition |
| Type | Description |
|---|---|
| boolean | true if range search view should be displayed, false otherwise |

isTrimmable(
string $type
)
:
boolean
| Name | Type | Description |
|---|---|---|
| $type | string |
| Type | Description |
|---|---|
| boolean |

save(
\SugarBean $bean, array $params, $field, $properties, $prefix
=
''
)
:
voidThis should be called when the bean is saved. The bean itself will be passed by reference
Inherited from: \SugarFieldBase::save()| Name | Type | Description |
|---|---|---|
| $bean | \SugarBean | bean - the bean performing the save |
| $params | array | params - an array of paramester relevant to the save, most likely will be $_REQUEST |
| $field | ||
| $properties | ||
| $prefix |

setup(
$parentFieldArray, $vardef, $displayParams, $tabindex, $twopass
=
true
)
:
voidSetup function to assign values to the smarty template, should be called before every display function
Inherited from: \SugarFieldBase::setup()| Name | Type | Description |
|---|---|---|
| $parentFieldArray | ||
| $vardef | ||
| $displayParams | ||
| $tabindex | ||
| $twopass |

setupFieldArray(
mixed $parentFieldArray, array $vardef
)
:
arraysetupFieldArray This method takes the $parentFieldArray mixed variable which may be an Array or object and attempts to call any custom fieldSpecific formatting to the value depending on the field type.
Inherited from: \SugarFieldBase::setupFieldArray()| Name | Type | Description |
|---|---|---|
| $parentFieldArray | mixed | Array or Object of data where the field's value comes from |
| $vardef | array | The vardef entry linked to the SugarField instance |
| Type | Description |
|---|---|
| array | $parentFieldArray The formatted $parentFieldArray with the formatField method possibly applied |
- See
- \SugarFieldEnum.php,

unformatField(
$formattedField, $vardef
)
:
void| Name | Type | Description |
|---|---|---|
| $formattedField | ||
| $vardef |