Documentation

CRM_Contact_Form_Search_Custom_FullText extends CRM_Contact_Form_Search_Custom_Base
in package
implements CRM_Contact_Form_Search_Interface

Tags
copyright

CiviCRM LLC https://civicrm.org/licensing

Table of Contents

Interfaces

CRM_Contact_Form_Search_Interface

Constants

LIMIT  = 10

Properties

$searchClassHandlesPrevNextCache  : bool
Does the search class handle the prev next cache saving.
$_columns  : mixed
$_entityIDTableName  : mixed
$_formValues  : mixed
$_foundRows  : mixed
$_limitClause  : array<string|int, mixed>|null
Limit clause.
$_limitDetailClause  : array<string|int, mixed>|null
Limit detail clause.
$_limitNumber  : mixed
$_limitNumberPlus1  : int
This should be one more than self::LIMIT.
$_limitRowClause  : array<string|int, mixed>|null
Limit row clause.
$_partialQueries  : array<string|int, CRM_Contact_Form_Search_Custom_FullText_AbstractPartialQuery>
$_stateID  : mixed
$_table  : mixed
$_tableFields  : mixed
$_text  : mixed
$_title  : string
The title of this form
$tableName  : mixed

Methods

__construct()  : mixed
Class constructor.
__destruct()  : mixed
addSortOffset()  : mixed
all()  : string
Retrieve all the values that match the current input parameters.
alterRow()  : mixed
buildForm()  : mixed
Builds the quickform for this search.
buildTaskList()  : array<string|int, mixed>
Builds the list of tasks or actions that a searcher can perform on a result set.
buildTempTable()  : void
columns()  : array<string|int, mixed>
contactIDs()  : null|string
count()  : null|string
fillPrevNextCache()  : bool
Fill the prevNextCache with the found contacts
fillTable()  : void
filterACLContacts()  : void
formRule()  : array<string|int, mixed>
Validate form input.
from()  : null
The from clause for the query.
getFieldValue()  : mixed|null
Get a value from $formValues. If missing, get it from the request.
getQueryObj()  : null
override this method to define the contact query object used for creating $sql
getTableName()  : mixed
includeContactIDs()  : mixed
initialize()  : mixed
setDefaultValues()  : array<string|int, mixed>
setTitle()  : mixed
Setter function for title.
sql()  : string
summary()  : array<string|int, mixed>
templateFile()  : string
toLimit()  : string
validateUserSQL()  : void
where()  : null
The where clause for the query.
whereClause()  : string

Constants

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.

$_entityIDTableName

protected mixed $_entityIDTableName = \NULL

$_formValues

protected mixed $_formValues

$_foundRows

protected mixed $_foundRows = []

$_limitClause

Limit clause.

protected array<string|int, mixed>|null $_limitClause = \NULL

NULL if no limit; or array(0 => $limit, 1 => $offset).

$_limitDetailClause

Limit detail clause.

protected array<string|int, mixed>|null $_limitDetailClause = \NULL

NULL if no limit; or array(0 => $limit, 1 => $offset).

$_limitNumber

protected mixed $_limitNumber = 10

$_limitNumberPlus1

This should be one more than self::LIMIT.

protected int $_limitNumberPlus1 = 11

$_limitRowClause

Limit row clause.

protected array<string|int, mixed>|null $_limitRowClause

NULL if no limit; or array(0 => $limit, 1 => $offset)

$_stateID

protected mixed $_stateID

$_tableFields

protected mixed $_tableFields = \NULL

$_title

The title of this form

protected string $_title = \NULL

Methods

__construct()

Class constructor.

public __construct(array<string|int, mixed> &$formValues) : mixed
Parameters
$formValues : array<string|int, mixed>

__destruct()

public __destruct() : mixed

addSortOffset()

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

all()

Retrieve all the values that match the current input parameters.

public all([int $offset = 0 ][, int $rowcount = 0 ][, null $sort = NULL ][, bool $includeContactIDs = FALSE ][, bool $justIDs = FALSE ]) : string
Parameters
$offset : int = 0
$rowcount : int = 0
$sort : null = NULL
$includeContactIDs : bool = FALSE
$justIDs : bool = FALSE
Return values
string

alterRow()

public alterRow(mixed &$row) : mixed
Parameters
$row : mixed

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>

buildTempTable()

public buildTempTable() : void

columns()

public & columns() : array<string|int, mixed>
Return values
array<string|int, mixed>

contactIDs()

public contactIDs([int $offset = 0 ][, int $rowcount = 0 ][, null $sort = NULL ][, bool $returnSQL = FALSE ]) : null|string
Parameters
$offset : int = 0
$rowcount : int = 0
$sort : null = NULL
$returnSQL : bool = FALSE
Return values
null|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.

filterACLContacts()

public filterACLContacts() : void

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()

The from clause for the query.

public from() : null
Return values
null

getFieldValue()

Get a value from $formValues. If missing, get it from the request.

public getFieldValue(array<string|int, mixed> $formValues, string $field, mixed $type[, null $default = NULL ]) : mixed|null
Parameters
$formValues : array<string|int, mixed>
$field : string
$type : mixed
$default : null = NULL
Tags
throws
CRM_Core_Exception
Return values
mixed|null

getQueryObj()

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

public getQueryObj() : null
Return values
null

getTableName()

public getTableName() : mixed

includeContactIDs()

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

initialize()

public initialize() : mixed

setDefaultValues()

public setDefaultValues() : array<string|int, mixed>
Return values
array<string|int, mixed>

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()

public summary() : array<string|int, mixed>
Return values
array<string|int, mixed>

templateFile()

public templateFile() : string
Return values
string

toLimit()

public toLimit(int|array<string|int, mixed> $limit) : string
Parameters
$limit : int|array<string|int, mixed>
Tags
see
CRM_Contact_Form_Search_Custom_FullText_AbstractPartialQuery::toLimit
Return values
string

SQL

validateUserSQL()

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

where()

The where clause for the query.

public where([bool $includeContactIDs = FALSE ]) : null
Parameters
$includeContactIDs : bool = FALSE
Return values
null

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