class SearchController extends AbstractController (View source)

Handles table search tab.

Display table search form, create SQL query from form data and call Sql::executeQueryAndSendQueryResponse() to execute it.

Properties

protected ResponseRenderer $response from  AbstractController
protected Template $template from  AbstractController
protected string $db from  AbstractController
protected string $table from  AbstractController

Methods

__construct(ResponseRenderer $response, Template $template, string $db, string $table, Search $search, Relation $relation, DatabaseInterface $dbi)

No description

void
render(string $templatePath, array $templateData = [])

No description

void
addScriptFiles(array $files)

No description

bool
hasDatabase()

No description

void
redirect(string $route, array $params = [])

No description

void
__invoke()

Index action

void
getDataRowAction()

Get data row action

void
doSelectionAction()

Do selection action

void
displaySelectionFormAction()

Display selection form action

void
rangeSearchAction()

Range search action

array|null
getColumnMinMax(string $column)

Finds minimum and maximum value of a given column.

array
getColumnProperties(int $search_index, int $column_index)

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

Details

__construct(ResponseRenderer $response, Template $template, string $db, string $table, Search $search, Relation $relation, DatabaseInterface $dbi)

No description

Parameters

ResponseRenderer $response
Template $template
string $db
string $table
Search $search
Relation $relation
DatabaseInterface $dbi

protected void render(string $templatePath, array $templateData = [])

No description

Parameters

string $templatePath
array $templateData

Return Value

void

protected void addScriptFiles(array $files)

No description

Parameters

array $files

Return Value

void

protected bool hasDatabase()

No description

Return Value

bool

protected void redirect(string $route, array $params = [])

No description

Parameters

string $route
array $params

Return Value

void

void __invoke()

Index action

Return Value

void

void getDataRowAction()

Get data row action

Return Value

void

void doSelectionAction()

Do selection action

Return Value

void

void displaySelectionFormAction()

Display selection form action

Return Value

void

void rangeSearchAction()

Range search action

Return Value

void

array|null getColumnMinMax(string $column)

Finds minimum and maximum value of a given column.

Parameters

string $column

Column name

Return Value

array|null

array getColumnProperties(int $search_index, int $column_index)

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

Parameters

int $search_index

Row number in table search form

int $column_index

Column index in ColumnNames array

Return Value

array

Array containing column's properties