class CRM_Contact_Form_Search_Custom_FullText_Contact extends CRM_Contact_Form_Search_Custom_FullText_AbstractPartialQuery

Properties

protected string $name from CRM_Contact_Form_Search_Custom_FullText_AbstractPartialQuery
protected string $label from CRM_Contact_Form_Search_Custom_FullText_AbstractPartialQuery

Methods

__construct()

Class constructor.

array
fillTempTable(string $queryText, string $entityIDTableName, $toTable, array|NULL $queryLimit, array|NULL $detailLimit)

No description

bool
isActive()

Check if search is permitted.

array
runQueries(string $queryText, array $tables, string $entityIDTableName, int $limit)

Run queries.

string
matchText(string $table, array|string $fullTextFields, string $queryText)

Create a SQL expression for matching against a list of.

moveFileIDs(string $toTable, string $parentIdColumn, array $files)

For any records in $toTable that originated with this query, append file information.

string
toLimit(int|array $limit)

No description

array
prepareQueries(string $queryText, string $entityIDTableName)

No description

moveIDs($fromTable, $toTable, $limit)

Move IDs.

Details

at line 38
__construct()

Class constructor.

string getLabel()

Get label.

Return Value

string

string getName()

Get name.

Return Value

string

at line 54
array fillTempTable(string $queryText, string $entityIDTableName, $toTable, array|NULL $queryLimit, array|NULL $detailLimit)

Parameters

string $queryText A string of text to search for.
string $entityIDTableName A temporary table into which we can write a list of all matching IDs.
$toTable
array|NULL $queryLimit overall limit (applied when building $entityIDTableName) NULL if no limit; or array(0 => $limit, 1 => $offset)
array|NULL $detailLimit final limit (applied when building $detailTable) NULL if no limit; or array(0 => $limit, 1 => $offset)

Return Value

array keys: match-descriptor - count: int

at line 47
bool isActive()

Check if search is permitted.

Return Value

bool

fillCustomInfo($tables, $extends)

Parameters

$tables
$extends

array runQueries(string $queryText, array $tables, string $entityIDTableName, int $limit)

Run queries.

Parameters

string $queryText
array $tables A list of places to query. Keys may be:. - sql: an array of SQL queries to execute - final: an array of SQL queries to execute at the end - *: All other keys are treated as table names
string $entityIDTableName
int $limit

Return Value

array Keys: match-descriptor - count: int - files: NULL | array

Exceptions

CRM_Core_Exception

string matchText(string $table, array|string $fullTextFields, string $queryText)

Create a SQL expression for matching against a list of.

text columns.

Parameters

string $table Eg "civicrm_note" or "civicrm_note mynote".
array|string $fullTextFields list of field names
string $queryText

Return Value

string SQL, eg "MATCH (col1) AGAINST (queryText)" or "col1 LIKE '%queryText%'"

moveFileIDs(string $toTable, string $parentIdColumn, array $files)

For any records in $toTable that originated with this query, append file information.

Parameters

string $toTable
string $parentIdColumn
array $files See return format of CRM_Core_FileSearchInterface::search.

string toLimit(int|array $limit)

Parameters

int|array $limit

Return Value

string SQL

See also

CRM_Contact_Form_Search_Custom_FullText::toLimit

array parseLimitOffset(array|int $limit)

Parameters

array|int $limit

Return Value

array (0 => $limit, 1 => $offset)

at line 70
array prepareQueries(string $queryText, string $entityIDTableName)

Parameters

string $queryText
string $entityIDTableName

Return Value

array list tables/queries (for runQueries)

at line 145
moveIDs($fromTable, $toTable, $limit)

Move IDs.

Parameters

$fromTable
$toTable
$limit