include/SearchForm/SearchForm.php
\SearchForm
Old search form
- Children
- \SearchFormReports
- \EmployeesSearchForm
- Api
Properties
array
$searchFields= ''
SearchField meta data array to use. Populated from moduleDir/metadata/SearchFields
- Type
- array
boolean
$showSavedSearchOptions= 'true'
Use to determine whether or not to show the saved search options
true
Details- Type
- boolean
Methods
SearchForm(
string $module, \bean $seedBean, string $tpl
=
null
)
:
void
loads SearchFields MetaData, sets member variables
Name | Type | Description |
---|---|---|
$module | string | moduleDir |
$seedBean | \bean | seed bean to use |
$tpl | string | template to use, defaults to moduleDir/SearchForm.html |
displayAdvanced(
bool $header
=
true, bool $return
=
false, $listViewDefs
=
'', $lv
=
''
)
:
string
displays the advanced search form body
Name | Type | Description |
---|---|---|
$header | bool | display this with headers |
$return | bool | echo or return the html |
$listViewDefs | ||
$lv |
Type | Description |
---|---|
string | html of contents |
displayBasic(
bool $header
=
true, bool $return
=
false
)
:
string
displays the basic search form body
Name | Type | Description |
---|---|---|
$header | bool | display this with headers |
$return | bool | echo or return the html |
Type | Description |
---|---|
string | html of contents |
displayHeader(
string $view
)
:
void
displays the search form header
Name | Type | Description |
---|---|---|
$view | string | which view is currently being displayed |
displaySavedViews(
$listViewDefs, $lv, bool $header
=
true, bool $return
=
false
)
:
string
displays the saved views form body
Name | Type | Description |
---|---|---|
$listViewDefs | ||
$lv | ||
$header | bool | display this with headers |
$return | bool | echo or return the html |
Type | Description |
---|---|
string | html of contents |
displayTabs(
string $currentKey
)
:
string
displays 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 |
displayWithHeaders(
string $view, string $basic_search_text
=
'', string $advanced_search_text
=
'', string $saved_views_text
=
''
)
:
void
displays the search form body, for example if basic_search is being displayed, then the function call would be displayWithHeaders('basic_search', $htmlForBasicSearchBody) {
Name | Type | Description |
---|---|---|
$view | string | which view is currently being displayed |
$basic_search_text | string | body of the basic search tab |
$advanced_search_text | string | body of the advanced search tab |
$saved_views_text | string | body of the saved views tab |
generateSearchWhere(
$add_custom_fields
=
false, $module
=
''
)
:
void
The fuction will returns an array of filter conditions.
Name | Type | Description |
---|---|---|
$add_custom_fields | ||
$module |
populateFromArray(
array $array, string $switchVar
=
null, bool $addAllBeanFields
=
true
)
:
void
Populate 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
)
:
void
Populate the searchFields from $_REQUEST
Name | Type | Description |
---|---|---|
$switchVar | string | variable to use in switch statement |
$addAllBeanFields | bool | true to process at all bean fields |