Textpattern PHP Cross Reference Content Management Systems

Summary: /textpattern/vendors/Textpattern/Search/Filter.php - 341 lines - 10528 bytes - Source - Print

Description: Admin-side search.

Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Filter:: (10 methods):
__construct()
setMethods()
setOptions()
setAliases()
getFilter()
renderForm()
getMethods()
setSearchMethod()
loadDefaultSearchMethod()
saveDefaultSearchMethod()

Class: Filter


__construct($event, $methods, $crit = null, $method = null)  line: 87
General constructor for searches.

param: string   $event   The admin-side event to which this search relates
param: string   $methods Available search methods
param: string   $crit    Criteria to be used in filter. If omitted, uses GET/POST value
param: string[] $method  Search method(s) to filter by. If omitted, uses GET/POST value or last-used method
setMethods($methods line: 113
Sets filter's search methods.

param: array $methods Array of column indices and their human-readable names/types
setOptions($options line: 126
Sets filter's options.

param: array $options Array of method indices and their corresponding array of attributes
setAliases($method, $tuples line: 141
Sets a method's aliases.

param: string $method Method index to which the aliases should apply
param: array  $tuples DB criteria => comma-separated list of user criteria values that are equivalent to it
getFilter($options = array()  line: 165
Generates SQL statements from the current criteria and search_method.

return: array The criteria SQL, searched value and the search locations
param: array $options Options
renderForm($step, $options = array()  line: 209
Renders an admin-side search form.

return: string HTML
param: string $step    Textpattern Step for the form submission
param: array  $options Options
getMethods()  line: 284
Returns all methods as a simple id->label array.

return: array
setSearchMethod($method = null)  line: 301
Search method(s) to filter by. If omitted, uses GET/POST value or last-used method.

param: string[]|string $method The method key(s) as either an array of strings or a comma-separated list.
loadDefaultSearchMethod()  line: 318
Load default search method from a private preference.

return: string[]    The default search method key(s).
saveDefaultSearchMethod()  line: 332
Save default search method to a private preference.

title

Body