include/SearchForm/SearchForm2.php
\SearchForm
New EditView
- Parent(s)
- \EditView
- Children
- \SearchFormReports
- \EmployeesSearchForm
Properties

$focus= ''
- Type
- n/a
- Inherited_from
- \EditView::$$focus

$footerTpl= ''
- Type
- n/a
- Inherited_from
- \EditView::$$footerTpl

$formName= ''''
''Details- Type
- n/a
- Inherited_from
- \EditView::$$formName

$formatFields= 'true'
trueDetails- Type
- n/a
- Inherited_from
- \EditView::$$formatFields

$headerTpl= ''
- Type
- n/a
- Inherited_from
- \EditView::$$headerTpl

$isDuplicate= ''
- Type
- n/a
- Inherited_from
- \EditView::$$isDuplicate

$metadataFile= ''
- Type
- n/a
- Inherited_from
- \EditView::$$metadataFile

$moduleTitleKey= ''
- Type
- n/a
- Inherited_from
- \EditView::$$moduleTitleKey

$notes= ''
- Type
- n/a
- Inherited_from
- \EditView::$$notes

$offset= '0'
0Details- Type
- n/a
- Inherited_from
- \EditView::$$offset

$populateBean= 'true'
trueDetails- Type
- n/a
- Inherited_from
- \EditView::$$populateBean

$quickSearchCode= ''
- Type
- n/a
- Inherited_from
- \EditView::$$quickSearchCode

$returnAction= ''
- Type
- n/a
- Inherited_from
- \EditView::$$returnAction

$returnId= ''
- Type
- n/a
- Inherited_from
- \EditView::$$returnId

$returnModule= ''
- Type
- n/a
- Inherited_from
- \EditView::$$returnModule

$sectionPanels= ''
- Type
- n/a
- Inherited_from
- \EditView::$$sectionPanels

$showDetailData= 'true'
trueDetails- Type
- n/a
- Inherited_from
- \EditView::$$showDetailData

$showSectionPanelsTitles= 'true'
trueDetails- Type
- n/a
- Inherited_from
- \EditView::$$showSectionPanelsTitles

$showVCRControl= 'true'
trueDetails- Type
- n/a
- Inherited_from
- \EditView::$$showVCRControl

$viewObject= 'null'
nullDetails- Type
- n/a
- Inherited_from
- \EditView::$$viewObject
Methods

SearchForm(
$seed, $module, $action
=
'index', $options
=
array()
)
:
void| Name | Type | Description |
|---|---|---|
| $seed | ||
| $module | ||
| $action | ||
| $options |

_displayTabs(
string $currentKey
)
:
stringdisplays the tabs (top of the search form)
| Name | Type | Description |
|---|---|---|
| $currentKey | string | key in $this->tabs to show as the current tab |
| Type | Description |
|---|---|
| string | html |

callFunction(
$vardef
)
:
void| Name | Type | Description |
|---|---|---|
| $vardef |

display(
$header
=
true
)
:
\HTMLdisplay This method makes the Smarty variable assignments and then displays the generated view.
| Name | Type | Description |
|---|---|---|
| $header |
| Type | Description |
|---|---|
| \HTML | display for view as String |

enableFormatting(
\$format $format
=
true
)
:
voidenableFormatting This method is used to manually turn on/off the field formatting
Inherited from: \EditView::enableFormatting()| Name | Type | Description |
|---|---|---|
| $format | \$format | boolean value to turn on/off field formatting |

generateSearchWhere(
bool $add_custom_fields
=
false, string $module
=
''
)
:
stringgenerateSearchWhere
This function serves as the central piece of SearchForm2.php It is responsible for creating the WHERE clause for a given search operation
| Name | Type | Description |
|---|---|---|
| $add_custom_fields | bool | boolean indicating whether or not custom fields should be added |
| $module | string | Module to search against |
| Type | Description |
|---|---|
| string | the SQL WHERE clause based on the arguments supplied in SearchForm2 instance |

getPanelWithFillers(
array $panel
)
:
array
Panel alignment will be off if the panel doesn't have a row with the max column It will not be aligned to the other panels so we fill out the columns in the last row
| Name | Type | Description |
|---|---|---|
| $panel | array |
| Type | Description |
|---|---|
| array |

getValueFromRequest(
\request $request, \name $name
)
:
StringgetValueFromRequest This is a helper method to extract a value from the request Array. We do some special processing for fields that start with 'date_' by checking to see if they also include time and meridiem values
Inherited from: \EditView::getValueFromRequest()| Name | Type | Description |
|---|---|---|
| $request | \request | The request Array |
| $name | \name | The field name to extract value for |
| Type | Description |
|---|---|
| String | value for given name |

insertJavascript(
$javascript
)
:
void| Name | Type | Description |
|---|---|---|
| $javascript |

isEmptyDropdownField(
\$value $name
=
'', $value
=
array()
)
:
voidisEmptyDropdownField
This function checks to see if a blank dropdown field was supplied. This scenario will occur where a dropdown select is in single selection mode
| Name | Type | Description |
|---|---|---|
| $name | \$value | Mixed dropdown value |
| $value |

locateFile(
string $file
)
:
bool | stringLocate a file in the custom or stock folders. Look in the custom folders first.
| Name | Type | Description |
|---|---|---|
| $file | string | The file we are looking for |
| Type | Description |
|---|---|
| bool | string | If the file is found return the path, False if not |

parseDateExpression(
string $operator, string $db_field, string $field_type
=
''
)
:
voidParse date expression and return WHERE clause
| Name | Type | Description |
|---|---|---|
| $operator | string | Date expression operator |
| $db_field | string | DB field name |
| $field_type | string | DB field type |

populateFromArray(
array $array, string $switchVar
=
null, bool $addAllBeanFields
=
true
)
:
voidPopulate the searchFields from an array
| Name | Type | Description |
|---|---|---|
| $array | array | array to search through |
| $switchVar | string | variable to use in switch statement |
| $addAllBeanFields | bool | true to process at all bean fields |

populateFromRequest(
string $switchVar
=
null, bool $addAllBeanFields
=
true
)
:
voidPopulate the searchFields from $_REQUEST
| Name | Type | Description |
|---|---|---|
| $switchVar | string | variable to use in switch statement |
| $addAllBeanFields | bool | true to process at all bean fields |

process(
$checkFormName
=
false, $formName
=
''
)
:
void| Name | Type | Description |
|---|---|---|
| $checkFormName | ||
| $formName |

retrieveSearchDefs(
$module
)
:
voidReturn the search defs for a particular module.
| Name | Type | Description |
|---|---|---|
| $module |
- Static

setOptions(
array $options
=
null
)
:
\SearchForm2Set options
| Name | Type | Description |
|---|---|---|
| $options | array |
| Type | Description |
|---|---|
| \SearchForm2 |

setup(
$searchdefs, $searchFields
=
array(), \$metadataFile $tpl, $displayView
=
'basic_search', $listViewDefs
=
array()
)
:
voidEditView constructor This is the EditView constructor responsible for processing the new Meta-Data framework
| Name | Type | Description |
|---|---|---|
| $searchdefs | ||
| $searchFields | ||
| $tpl | \$metadataFile | String value of file location to use in overriding default metadata file |
| $displayView | ||
| $listViewDefs |

showTitle(
$showTitle
=
false
)
:
voidAllow Subviews to overwrite this method to show custom titles.
Inherited from: \EditView::showTitle()Examples: Projects & Project Templates. params: $showTitle: boolean for backwards compatibility.
| Name | Type | Description |
|---|---|---|
| $showTitle |