Base class for catalogue search / custom content fields search.

package search

 Methods

Get a list of extra sort fields.

_get_extra_sort_fields(string $catalogue_name) : array

Parameters

$catalogue_name

string

Catalogue we are searching in in (may be a special custom content fields catalogue)

Returns

arrayA map between parameter name and string label

Get a list of extra fields to ask for.

_get_fields(string $catalogue_name) : array

Parameters

$catalogue_name

string

Catalogue to search in (may be a special custom content fields catalogue)

Returns

arrayA list of maps specifying extra fields

Get details needed (SQL etc) to perform an advanced field search.

_get_search_parameterisation_advanced(string $catalogue_name, string $table_alias = 'r') : \?array

Parameters

$catalogue_name

string

Catalogue we are searching in in (may be a special custom content fields catalogue)

$table_alias

string

Table alias for main content table

Returns

\?arrayA big tuple of details used to search with (null: no fields)

Get details needed (SQL etc) to perform an advanced field search for custom content fields (builds on _get_search_parameterisation_advanced).

_get_search_parameterisation_advanced_for_content_type(string $catalogue_name, string $table, string $where_clause, array $trans_fields, array $nontrans_fields) 

Parameters

$catalogue_name

string

Catalogue we are searching in in (may be a special custom content fields catalogue)

$table

string

Table clause to add to

$where_clause

string

Where clause to add to

$trans_fields

array

Translatable fields to add to

$nontrans_fields

array

Non-translatable fields to add to

Insert a date range check into a WHERE clause.

_handle_date_check(mixed $cutoff, string $field, string $where_clause) 

Parameters

$cutoff

mixed

Cutoff date (TIME or a pair representing the range)

$field

string

The field name of the timestamp field in the database

$where_clause

string

Additional where clause will be written into here

Do a date range check for a known timestamp.

_handle_date_check_runtime(mixed $cutoff, \TIME $compare) : boolean

Parameters

$cutoff

mixed

Cutoff date (TIME or a pair representing the range)

$compare

\TIME

Timestamp to compare to

Returns

booleanWhether the date matches the requirements of $cutoff