class RegistryPageController extends PageController (View source)

Properties

Methods

public
string
AllQueryVars()

Get all search query vars, compiled into a query string for a URL.

public
string
QueryLink()

Get all search query vars except Sort and Dir, compiled into a query link.

public
Sort()

No description

public
string
OppositeDirection()

Return the opposite direction from the currently sorted column's direction.

public
RegistryFilterForm()

No description

public
array
doRegistryFilter(array $data, $form, $request)

Build up search filters from user's search criteria and hand off to the query() method to search against the database.

public
doRegistryFilterReset($data, $form, $request)

No description

public
RegistryEntries($paginated = true)

No description

public
bool
canSortBy(string $property)

Loosely check if the record can be sorted by a property

public
Columns(int $id = null)

Format a set of columns, used for headings and row data

public
export($request)

Exports out all the data for the current search results.

public
show($request)

No description

protected
queryList()

Perform a search against the data table.

protected
bool
instanceHasRelationship(DataObject $singleton, string $field)

Returns boolean if the fieldname is a relationship on the instance.

protected
array
escapeSelect(array $names)

Safely escape a list of "select" candidates for a query

protected
array
queryVars()

Compiles all available GET variables for the result columns into an array. Used internally, not to be used directly with the templates or outside classes.

public
getTemplateList($action)

No description

public
string
getClassNameForUrl($className)

Sanitise a PHP class name for display in URLs etc

Details

string AllQueryVars()

Get all search query vars, compiled into a query string for a URL.

This will escape all the variables to avoid XSS.

Return Value

string

Get all search query vars except Sort and Dir, compiled into a query link.

This will escape all the variables to avoid XSS.

Return Value

string

Sort()

No description

string OppositeDirection()

Return the opposite direction from the currently sorted column's direction.

Return Value

string

RegistryFilterForm()

No description

array doRegistryFilter(array $data, $form, $request)

Build up search filters from user's search criteria and hand off to the query() method to search against the database.

Parameters

array $data

Form request data

$form
$request

Return Value

array

doRegistryFilterReset($data, $form, $request)

No description

Parameters

$data
$form
$request

RegistryEntries($paginated = true)

No description

Parameters

$paginated

bool canSortBy(string $property)

Loosely check if the record can be sorted by a property

Parameters

string $property

Return Value

bool

ArrayList Columns(int $id = null)

Format a set of columns, used for headings and row data

Parameters

int $id

The result ID to reference

Return Value

ArrayList

Exceptions

RegistryException

export($request)

Exports out all the data for the current search results.

Sends the data to the browser as a CSV file.

Parameters

$request

show($request)

No description

Parameters

$request

protected SS_List queryList()

Perform a search against the data table.

Return Value

SS_List

protected bool instanceHasRelationship(DataObject $singleton, string $field)

Returns boolean if the fieldname is a relationship on the instance.

Parameters

DataObject $singleton
string $field

Return Value

bool

protected array escapeSelect(array $names)

Safely escape a list of "select" candidates for a query

Parameters

array $names

List of select fields

Return Value

array

List of names, with each name double quoted

protected array queryVars()

Compiles all available GET variables for the result columns into an array. Used internally, not to be used directly with the templates or outside classes.

This will NOT escape values to avoid XSS.

Return Value

array

getTemplateList($action)

No description

Parameters

$action

string getClassNameForUrl($className)

Sanitise a PHP class name for display in URLs etc

Parameters

$className

Return Value

string