class SearchController extends AbstractController

Class SearchController

Properties

protected Response $response from AbstractController
protected DatabaseInterface $dbi from AbstractController
protected Template $template from AbstractController
protected string $db from AbstractController
protected string $table from AbstractController
protected $url_query

Methods

__construct(Response $response, DatabaseInterface $dbi, Template $template, string $db, string $table, string $searchType, string $url_query, Relation $relation)

Constructor

void
indexAction()

Index action

void
zoomSubmitAction(string $dataLabel, string $goto)

Zoom submit action

void
changeTableInfoAction()

Change table info action

void
getDataRowAction()

Get data row action

void
doSelectionAction()

Do selection action

void
displaySelectionFormAction(string $dataLabel = null)

Display selection form action

void
rangeSearchAction()

Range search action

void
findAction()

Find action

void
replaceAction()

Replace action

string
getReplacePreview(int $columnIndex, string $find, string $replaceWith, boolean $useRegex, string $charSet)

Returns HTML for previewing strings found and their replacements

void
replace(int $columnIndex, string $find, string $replaceWith, boolean $useRegex, string $charSet)

Replaces a given string in a column with a give replacement

array
getColumnMinMax(string $column)

Finds minimum and maximum value of a given column.

array
getColumnProperties(integer $search_index, integer $column_index)

Provides a column's type, collation, operators list, and criteria value to display in table search form

Details

at line 102
__construct(Response $response, DatabaseInterface $dbi, Template $template, string $db, string $table, string $searchType, string $url_query, Relation $relation)

Constructor

Parameters

Response $response Response object
DatabaseInterface $dbi DatabaseInterface object
Template $template Template that should be used (if provided, default one otherwise)
string $db Database name
string $table Table name
string $searchType Search type
string $url_query URL query
Relation $relation Relation instance

at line 192
void indexAction()

Index action

Return Value

void

at line 330
void zoomSubmitAction(string $dataLabel, string $goto)

Zoom submit action

Parameters

string $dataLabel Data label
string $goto Goto

Return Value

void

at line 413
void changeTableInfoAction()

Change table info action

Return Value

void

at line 443
void getDataRowAction()

Get data row action

Return Value

void

at line 476
void doSelectionAction()

Do selection action

Return Value

void

at line 516
void displaySelectionFormAction(string $dataLabel = null)

Display selection form action

Parameters

string $dataLabel Data label

Return Value

void

at line 591
void rangeSearchAction()

Range search action

Return Value

void

at line 602
void findAction()

Find action

Return Value

void

at line 622
void replaceAction()

Replace action

Return Value

void

at line 651
string getReplacePreview(int $columnIndex, string $find, string $replaceWith, boolean $useRegex, string $charSet)

Returns HTML for previewing strings found and their replacements

Parameters

int $columnIndex index of the column
string $find string to find in the column
string $replaceWith string to replace with
boolean $useRegex to use Regex replace or not
string $charSet character set of the connection

Return Value

string HTML for previewing strings found and their replacements

at line 778
void replace(int $columnIndex, string $find, string $replaceWith, boolean $useRegex, string $charSet)

Replaces a given string in a column with a give replacement

Parameters

int $columnIndex index of the column
string $find string to find in the column
string $replaceWith string to replace with
boolean $useRegex to use Regex replace or not
string $charSet character set of the connection

Return Value

void

at line 837
array getColumnMinMax(string $column)

Finds minimum and maximum value of a given column.

Parameters

string $column Column name

Return Value

array

at line 929
array getColumnProperties(integer $search_index, integer $column_index)

Provides a column's type, collation, operators list, and criteria value to display in table search form

Parameters

integer $search_index Row number in table search form
integer $column_index Column index in ColumnNames array

Return Value

array Array containing column's properties