\app_more_action_search

Basic Search

Usage:

public function execute() {

//do stuff before search will be excuted
switch(parent::execute()) {
    case self::NO_REQUEST:
       //no request submited
       break;
   case self::RESULTS_FOUND:
       //results were found
       break
   case self::NO_RESULTS_FOUND:
        //no results were found
       break;
}
//do stuff after search

}

For preparing a record for the results use the _prepareContentRecord method or implement a concrete method for a fuman table with function syntax:

   _prepareTableUniqueNameWithCamelCase

Example for table "page_editorial":

protected function _preparePageEditorial(Fuman_Template_Data $data) {

}

Return null if you want to hide the record in the results. All hidden records are stored in the $_skippedSearchItems array.

The search-results and the count will be set on responseData with Keys: searchResults, searchResultCount

Summary

Methods
Properties
Constants
prepareSitemap()
__construct()
getActionDescriptor()
getApp()
getName()
getClassName()
init()
execute()
returnToCallerUri()
acceptsHttpAuth()
requiresDatabaseConnection()
requiresInstalledApplication()
isDaemon()
isAccessValid()
getState()
setState()
getMaxResultCount()
No public properties found
LAYOUT_PRIORITY
ICON_PATH
NO_REQUEST
RESULTS_FOUND
NO_RESULTS_FOUND
_getTemplatePath()
_getRequiredParams()
_isAccessToActionValid()
_isAccessToTableValid()
_isAccessToInputTypeValid()
_isAccessToRecordValid()
_getAclTableActionName()
_isProtectionHashValid()
_execute()
_getSearchQuery()
_prepareContentRecord()
_prepareSearchMeta()
_getSearchableTables()
_setSearchFormName()
_getSearchFormName()
_getSearchResults()
_getSkippedSearchResults()
_createFunctionName()
$_actionDescriptor
$_app
$_name
$_className
$_responseData
$_config
$_searchFormName
$_parsedSearchItems
$_skippedSearchItems
$_functionNameStorage
$_state
N/A
No private methods found
No private properties found
N/A

Constants

LAYOUT_PRIORITY

LAYOUT_PRIORITY

ICON_PATH

ICON_PATH

NO_REQUEST

NO_REQUEST

RESULTS_FOUND

RESULTS_FOUND

NO_RESULTS_FOUND

NO_RESULTS_FOUND

Properties

$_actionDescriptor

$_actionDescriptor : 

Type

$_app

$_app : string

Type

string

$_name

$_name : string

Type

string

$_className

$_className : string

Type

string

$_config

$_config : \stdClass

Type

\stdClass

$_searchFormName

$_searchFormName : string

Type

string

$_parsedSearchItems

$_parsedSearchItems : array<mixed,\Fuman_Template_Data>

Type

array<mixed,\Fuman_Template_Data>

$_skippedSearchItems

$_skippedSearchItems : array<mixed,\Fuman_Template_Data>

Type

array<mixed,\Fuman_Template_Data>

$_functionNameStorage

$_functionNameStorage : array<mixed,string>

Type

array<mixed,string>

$_state

$_state : integer

Type

integer

Methods

__construct()

__construct() 

Constructor

getActionDescriptor()

getActionDescriptor() : \Fuman_Action_Descriptor|null

Gets action descriptor

Returns

\Fuman_Action_Descriptor|null

getApp()

getApp() : string

Returns app string

Returns

string

getName()

getName() : string

Returns action name

Returns

string

getClassName()

getClassName() : string

Gets class name

Returns

string

init()

init() : void

Initializes the action

execute()

execute() : void

Execute

returnToCallerUri()

returnToCallerUri(boolean  $reroute = false) : null|void

Parses caller and returns it or reroutes to it, depends o first argument

Parameters

boolean $reroute

Returns

null|void

acceptsHttpAuth()

acceptsHttpAuth() : boolean

Does the action accepts Http authentication (Fuman_Auth_Http_Basic)

Returns

boolean

requiresDatabaseConnection()

requiresDatabaseConnection() : boolean

Does action require database access

Returns

boolean

requiresInstalledApplication()

requiresInstalledApplication() : boolean

Does action require an installed application

Returns

boolean

isDaemon()

isDaemon() : boolean

Daemon actions wont affect session last update

Returns

boolean

isAccessValid()

isAccessValid() : integer

Checks if Access to Action is valid

Returns

integer

getState()

getState() : integer

Returns search state

Returns

integer

setState()

setState(integer  $state) 

Sets search state

Parameters

integer $state

getMaxResultCount()

getMaxResultCount() : integer

Gets the max result count

Returns

integer

_getTemplatePath()

_getTemplatePath() : null|string

Returns script path of action.

Returns

null|string

_getRequiredParams()

_getRequiredParams() : array

List of params which have to be set on request.

Returns

array

_isAccessToActionValid()

_isAccessToActionValid() : integer

Checks if access to Fuman_Action_Abstract is valid

Returns

integer

_isAccessToTableValid()

_isAccessToTableValid() : integer

Checks if access to Fuman_Action_Table_Interface is valid

Returns

integer

_isAccessToInputTypeValid()

_isAccessToInputTypeValid() : integer

Checks if access to Fuman_Action_Record_Interface is valid

Returns

integer

_isAccessToRecordValid()

_isAccessToRecordValid() : integer

Checks if access to Fuman_Action_Record_Interface is valid

Returns

integer

_getAclTableActionName()

_getAclTableActionName() : string

Gets the action name for the acl table subset (default: get_class($this))

Returns

string

_isProtectionHashValid()

_isProtectionHashValid(string  $appName, string  $actionName, \Fuman_Table  $table, string  $id) : boolean

Check protection hash

Parameters

string $appName
string $actionName
\Fuman_Table $table
string $id

Returns

boolean

_execute()

_execute(string|null  $searchIndexColumnName = null) : integer

Execute

Parameters

string|null $searchIndexColumnName

Returns

integer

_getSearchQuery()

_getSearchQuery() : string

Gets search query

Returns

string

_getSearchableTables()

_getSearchableTables() : array

Gets searchable tables

Returns

array

_setSearchFormName()

_setSearchFormName(string  $formName) 

Sets search form name

Parameters

string $formName

_getSearchFormName()

_getSearchFormName() : string

Gets search form name

Returns

string

_getSearchResults()

_getSearchResults() : array<mixed,\Fuman_Template_Data>

Gets search results

Returns

array<mixed,\Fuman_Template_Data>

_getSkippedSearchResults()

_getSkippedSearchResults() : array<mixed,\Fuman_Template_Data>

Gets skipped search results

Returns

array<mixed,\Fuman_Template_Data>

_createFunctionName()

_createFunctionName(string  $uniqueName) : string

Create function name for a given table unique name.

Example: Given $uniqueName: page_editorial_section Returned functionName: _preparePageEditorialSection

Function names are used to give the possibility to change search results for a specific table.

Parameters

string $uniqueName

Returns

string