include/SearchForm/SearchForm2.php

Show: inherited
Table of Contents

\SearchForm

Package:

Old EditView

Parent(s)
\EditView
Children
\EmployeesSearchForm

Properties

Propertypublic  $action= ''index''
Default value'index'Details
Type
n/a
Propertypublic  $customFieldDefs= ''
Details
Type
n/a
Propertypublic  $displaySavedSearch= 'true'
Default valuetrueDetails
Type
n/a
Propertypublic  $displayType= ''searchView''
Default value'searchView'Details
Type
n/a
Propertypublic  $displayView= ''basic_search''
Default value'basic_search'Details
Type
n/a
Propertypublic  $fieldDefs= ''
Details
Type
n/a
Propertypublic  $formData= ''
Details
Type
n/a
Propertypublic  $listViewDefs= 'array()'
Default valuearray()Details
Type
n/a
Propertypublic  $lv= ''
Details
Type
n/a
Propertypublicstring  $module= ''''

Module to use

Default value''Details
Type
string
Propertypublic  $nbTabs= '0'
Default value0Details
Type
n/a
Propertyprotectedarray  $options= ''

Details
Type
array
Propertypublic  $parsedView= ''basic''
Default value'basic'Details
Type
n/a
Propertypublic  $searchFields= ''
Details
Type
n/a
Propertypublic  $searchdefs= 'array()'
Default valuearray()Details
Type
n/a
Propertypublic  $seed= 'null'
Default valuenullDetails
Type
n/a
Propertypublic  $showAdvanced= 'true'
Default valuetrueDetails
Type
n/a
Propertypublic  $showBasic= 'true'
Default valuetrueDetails
Type
n/a
Propertypublic  $showCustom= 'false'
Default valuefalseDetails
Type
n/a
Propertypublic  $showSavedSearchesOptions= 'true'
Default valuetrueDetails
Type
n/a
Propertypublicobject  $ss= ''
inherited

smarty object

Inherited from: \EditView::$$ss
Details
Type
object
Inherited_from
\EditView::$$ss  
Propertypublic  $tabs= ''
Details
Type
n/a
Propertypublicstring  $template= ''
inherited

location of template to use

Inherited from: \EditView::$$template
Details
Type
string
Inherited_from
\EditView::$$template  
Propertypublic  $th= ''
Details
Type
n/a
Propertypublic  $tpl= ''
Details
Type
n/a
Propertypublic  $view= ''SearchForm''
Default value'SearchForm'Details
Type
n/a

Methods

methodpublicEditView( string $module, string $template ) : void
inherited

Inherited from: \EditView::EditView()
Parameters
Name Type Description
$module string

module to use

$template string

template of the form to retreive

methodpublicSearchForm(  $seed,  $module,  $action = 'index',  $options = array() ) : void

Parameters
Name Type Description
$seed
$module
$action
$options
methodpublic_build_field_defs( ) : void

methodpublic_displayTabs( string $currentKey ) : string

displays the tabs (top of the search form)

Parameters
Name Type Description
$currentKey string

key in $this->tabs to show as the current tab

Returns
Type Description
string html
methodpublicdisplay(  $header = true ) : string

Displays the template

Parameters
Name Type Description
$header
Returns
Type Description
string HTML of parsed template
methodpublicdisplaySavedSearch( ) : void

methodpublicdisplaySavedSearchSelect( ) : void

methodpublicgenerateSearchWhere( bool $add_custom_fields = false, string $module = '' ) : string

generateSearchWhere

This function serves as the central piece of SearchForm2.php It is responsible for creating the WHERE clause for a given search operation

Parameters
Name Type Description
$add_custom_fields bool

boolean indicating whether or not custom fields should be added

$module string

Module to search against

Returns
Type Description
string the SQL WHERE clause based on the arguments supplied in SearchForm2 instance
methodpublicgetOptions( ) : array

Get Options

Returns
Type Description
array
methodprivateisEmptyDropdownField( \$value $name = '',  $value = array() ) : void

isEmptyDropdownField

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

Parameters
Name Type Description
$name \$value

Mixed dropdown value

$value
methodprotectedlocateFile( string $file ) : bool | string

Locate a file in the custom or stock folders. Look in the custom folders first.

Parameters
Name Type Description
$file string

The file we are looking for

Returns
Type Description
bool | string If the file is found return the path, False if not
methodprotectedparseDateExpression( string $operator, string $db_field, string $field_type = '' ) : void

Parse date expression and return WHERE clause

Parameters
Name Type Description
$operator string

Date expression operator

$db_field string

DB field name

$field_type string

DB field type

methodpublicpopulateFromArray( array $array, string $switchVar = null, bool $addAllBeanFields = true ) : void

Populate the searchFields from an array

Parameters
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

methodpublicpopulateFromRequest( string $switchVar = null, bool $addAllBeanFields = true ) : void

Populate the searchFields from $_REQUEST

Parameters
Name Type Description
$switchVar string

variable to use in switch statement

$addAllBeanFields bool

true to process at all bean fields

methodpublicprocess( ) : void
inherited

Processes / setups the template assigns all things to the template like mod_srings and app_strings

Inherited from: \EditView::process()
methodpublicretrieveSearchDefs(  $module ) : void
static

Return the search defs for a particular module.

Parameters
Name Type Description
$module
Details
Static
 
methodpublicsetOptions( array $options = null ) : \SearchForm2

Set options

Parameters
Name Type Description
$options array
Returns
Type Description
\SearchForm2
methodpublicsetup(  $searchdefs,  $searchFields = array(),  $tpl,  $displayView = 'basic_search',  $listViewDefs = array() ) : void

Parameters
Name Type Description
$searchdefs
$searchFields
$tpl
$displayView
$listViewDefs
Documentation was generated by DocBlox 0.18.1.