Documentation

test_extension_manager_searchtest extends CRM_Contact_Form_Search_Custom_Base
in package
implements CRM_Contact_Form_Search_Interface

Class test_extension_manager_searchtest

Table of Contents

Interfaces

CRM_Contact_Form_Search_Interface

Properties

$searchClassHandlesPrevNextCache  : bool
Does the search class handle the prev next cache saving.
$_columns  : mixed
$_formValues  : mixed
$_stateID  : mixed
$_title  : string
The title of this form

Methods

__construct()  : mixed
Class constructor.
addSortOffset()  : mixed
all()  : mixed
Construct a full SQL query which returns one page worth of results.
alterRow()  : void
Modify the content of each row.
buildForm()  : void
Prepare a set of search fields.
buildTaskList()  : array<string|int, mixed>
Builds the list of tasks or actions that a searcher can perform on a result set.
columns()  : mixed
Get a list of displayable columns.
contactIDs()  : string
count()  : null|string
fillPrevNextCache()  : bool
Fill the prevNextCache with the found contacts
formRule()  : array<string|int, mixed>
Validate form input.
from()  : mixed
Construct a SQL FROM clause.
getQueryObj()  : null
override this method to define the contact query object used for creating $sql
includeContactIDs()  : mixed
select()  : mixed
Construct a SQL SELECT clause.
setTitle()  : mixed
Setter function for title.
sql()  : string
summary()  : mixed
Get a list of summary data points.
templateFile()  : null
Determine the Smarty template for the search screen.
validateUserSQL()  : void
where()  : mixed
Construct a SQL WHERE clause.
whereClause()  : string

Properties

$searchClassHandlesPrevNextCache

Does the search class handle the prev next cache saving.

public bool $searchClassHandlesPrevNextCache = \FALSE

This can be set to yes as long as a UI test works, and the deprecation notice will disappear.

$_columns

protected mixed $_columns

$_formValues

protected mixed $_formValues

$_stateID

protected mixed $_stateID

$_title

The title of this form

protected string $_title = \NULL

Methods

__construct()

Class constructor.

public __construct(mixed &$formValues) : mixed
Parameters
$formValues : mixed

addSortOffset()

public addSortOffset(mixed &$sql, mixed $offset, mixed $rowcount, mixed $sort) : mixed
Parameters
$sql : mixed
$offset : mixed
$rowcount : mixed
$sort : mixed

all()

Construct a full SQL query which returns one page worth of results.

public all([int $offset = 0 ][, int $rowcount = 0 ][, null $sort = NULL ][, bool $includeContactIDs = FALSE ]) : mixed
Parameters
$offset : int = 0
$rowcount : int = 0
$sort : null = NULL
$includeContactIDs : bool = FALSE
Tags
@return

string, sql

alterRow()

Modify the content of each row.

public alterRow(array<string|int, mixed> &$row) : void
Parameters
$row : array<string|int, mixed>

Modifiable SQL result row.

buildTaskList()

Builds the list of tasks or actions that a searcher can perform on a result set.

public buildTaskList(CRM_Core_Form_Search $form) : array<string|int, mixed>

The returned array completely replaces the task list, so a child class that wants to modify the existing list should manipulate the result of this method.

Parameters
$form : CRM_Core_Form_Search
Return values
array<string|int, mixed>

columns()

Get a list of displayable columns.

public & columns() : mixed
Tags
@return

array, keys are printable column headers and values are SQL column names

contactIDs()

public contactIDs([int $offset = 0 ][, int $rowcount = 0 ][, null $sort = NULL ][, bool $returnSQL = FALSE ]) : string
Parameters
$offset : int = 0
$rowcount : int = 0
$sort : null = NULL
$returnSQL : bool = FALSE

Deprecated parameter

Return values
string

count()

public count() : null|string
Return values
null|string

fillPrevNextCache()

Fill the prevNextCache with the found contacts

public fillPrevNextCache(mixed $cacheKey, mixed $start, mixed $end, mixed $sort) : bool
Parameters
$cacheKey : mixed
$start : mixed
$end : mixed
$sort : mixed
Return values
bool

TRUE if the search was able to process it.

formRule()

Validate form input.

public formRule(array<string|int, mixed> $fields, array<string|int, mixed> $files, CRM_Core_Form $self) : array<string|int, mixed>
Parameters
$fields : array<string|int, mixed>
$files : array<string|int, mixed>
$self : CRM_Core_Form
Return values
array<string|int, mixed>

Input errors from the form.

from()

Construct a SQL FROM clause.

public from() : mixed
Tags
@return

string, sql fragment with FROM and JOIN clauses

getQueryObj()

override this method to define the contact query object used for creating $sql

public getQueryObj() : null
Return values
null

includeContactIDs()

public static includeContactIDs(mixed &$sql, mixed &$formValues) : mixed
Parameters
$sql : mixed
$formValues : mixed

select()

Construct a SQL SELECT clause.

public select() : mixed
Tags
@return

string, sql fragment with SELECT arguments

setTitle()

Setter function for title.

public setTitle(string $title) : mixed
Parameters
$title : string

The title of the form.

sql()

public sql(mixed $selectClause[, int $offset = 0 ][, int $rowcount = 0 ][, null $sort = NULL ][, bool $includeContactIDs = FALSE ][, null $groupBy = NULL ]) : string
Parameters
$selectClause : mixed
$offset : int = 0
$rowcount : int = 0
$sort : null = NULL
$includeContactIDs : bool = FALSE
$groupBy : null = NULL
Return values
string

summary()

Get a list of summary data points.

public summary() : mixed
Return values
mixed
  • NULL or array with keys:
    • summary: string
    • total: numeric

templateFile()

Determine the Smarty template for the search screen.

public templateFile() : null
Tags
@return

string, template path (findable through Smarty template path)

Return values
null

validateUserSQL()

public validateUserSQL(mixed $sql[, bool $onlyWhere = FALSE ]) : void
Parameters
$sql : mixed
$onlyWhere : bool = FALSE

where()

Construct a SQL WHERE clause.

public where([bool $includeContactIDs = FALSE ]) : mixed
Parameters
$includeContactIDs : bool = FALSE
Tags
@return

string, sql fragment with conditional expressions

whereClause()

public whereClause(mixed &$where, array<string|int, mixed> &$params) : string
Parameters
$where : mixed
$params : array<string|int, mixed>
Return values
string

        
On this page

Search results