modules/Employees/EmployeesSearchForm.php
\EmployeesSearchForm
Old EditView
- Parent(s)
- \SearchForm < \EditView
Properties

$action= ''index''
'index'Details- Type
- n/a
- Inherited_from
- \SearchForm::$$action

$customFieldDefs= ''
- Type
- n/a
- Inherited_from
- \SearchForm::$$customFieldDefs

$displaySavedSearch= 'true'
trueDetails- Type
- n/a
- Inherited_from
- \SearchForm::$$displaySavedSearch

$displayType= ''searchView''
'searchView'Details- Type
- n/a
- Inherited_from
- \SearchForm::$$displayType

$displayView= ''basic_search''
'basic_search'Details- Type
- n/a
- Inherited_from
- \SearchForm::$$displayView

$fieldDefs= ''
- Type
- n/a
- Inherited_from
- \SearchForm::$$fieldDefs

$formData= ''
- Type
- n/a
- Inherited_from
- \SearchForm::$$formData

$listViewDefs= 'array()'
array()Details- Type
- n/a
- Inherited_from
- \SearchForm::$$listViewDefs

$lv= ''
- Type
- n/a
- Inherited_from
- \SearchForm::$$lv

$nbTabs= '0'
0Details- Type
- n/a
- Inherited_from
- \SearchForm::$$nbTabs

array
$options= ''
- Type
- array
- Inherited_from
- \SearchForm::$$options

$parsedView= ''basic''
'basic'Details- Type
- n/a
- Inherited_from
- \SearchForm::$$parsedView

$searchFields= ''
- Type
- n/a
- Inherited_from
- \SearchForm::$$searchFields

$searchdefs= 'array()'
array()Details- Type
- n/a
- Inherited_from
- \SearchForm::$$searchdefs

$seed= 'null'
nullDetails- Type
- n/a
- Inherited_from
- \SearchForm::$$seed

$showAdvanced= 'true'
trueDetails- Type
- n/a
- Inherited_from
- \SearchForm::$$showAdvanced

$showBasic= 'true'
trueDetails- Type
- n/a
- Inherited_from
- \SearchForm::$$showBasic

$showCustom= 'false'
falseDetails- Type
- n/a
- Inherited_from
- \SearchForm::$$showCustom

$showSavedSearchesOptions= 'true'
trueDetails- Type
- n/a
- Inherited_from
- \SearchForm::$$showSavedSearchesOptions

$tabs= ''
- Type
- n/a
- Inherited_from
- \SearchForm::$$tabs

string
$template= ''
- Type
- string
- Inherited_from
- \EditView::$$template
- Inherited_from
- \SearchForm::$$template

$th= ''
- Type
- n/a
- Inherited_from
- \SearchForm::$$th

$tpl= ''
- Type
- n/a
- Inherited_from
- \SearchForm::$$tpl

$view= ''SearchForm''
'SearchForm'Details- Type
- n/a
- Inherited_from
- \SearchForm::$$view
Methods

EditView(
string $module, string $template
)
:
void
| Name | Type | Description |
|---|---|---|
| $module | string | module to use |
| $template | string | template of the form to retreive |

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

__construct(
$oldSearchForm
)
:
voidThis builds an EmployeesSearchForm from a classic search form.
| Name | Type | Description |
|---|---|---|
| $oldSearchForm |

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

display(
$header
=
true
)
:
string
| Name | Type | Description |
|---|---|---|
| $header |
| Type | Description |
|---|---|
| string | HTML of parsed template |

displaySavedSearchSelect(
)
:
void
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 |

isEmptyDropdownField(
\$value $name
=
'', $value
=
array()
)
:
void
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.
Inherited from: \SearchForm::locateFile()| 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
Inherited from: \SearchForm::parseDateExpression()| 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
)
:
void
| 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
Inherited from: \SearchForm::populateFromRequest()| Name | Type | Description |
|---|---|---|
| $switchVar | string | variable to use in switch statement |
| $addAllBeanFields | bool | true to process at all bean fields |

process(
)
:
voidProcesses / setups the template assigns all things to the template like mod_srings and app_strings
Inherited from: \EditView::process()\SearchForm::process()
retrieveSearchDefs(
$module
)
:
voidReturn the search defs for a particular module.
Inherited from: \SearchForm::retrieveSearchDefs()| Name | Type | Description |
|---|---|---|
| $module |
- Static

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

setup(
$searchdefs, $searchFields
=
array(), $tpl, $displayView
=
'basic_search', $listViewDefs
=
array()
)
:
void| Name | Type | Description |
|---|---|---|
| $searchdefs | ||
| $searchFields | ||
| $tpl | ||
| $displayView | ||
| $listViewDefs |