include/SearchForm/SearchForm2.php
\SearchForm
Old EditView
- Parent(s)
- \EditView
- Children
- \EmployeesSearchForm
Properties
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 |

_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 |

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

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()
)
:
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(
)
:
voidProcesses / setups the template assigns all things to the template like mod_srings and app_strings
Inherited from: \EditView::process()
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 |