CRM_Contact_Form_Search_Custom_FullText_Contribution
extends CRM_Contact_Form_Search_Custom_FullText_AbstractPartialQuery
in package
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- Class constructor.
- fillCustomInfo() : mixed
- fillTempTable() : array<string|int, mixed>
- Execute a query and write out a page worth of matches to $detailTable.
- getLabel() : string
- Get label.
- getName() : string
- Get name.
- isActive() : bool
- Check if search is permitted.
- matchText() : string
- Create a SQL expression for matching against a list of.
- moveFileIDs() : mixed
- For any records in $toTable that originated with this query, append file information.
- moveIDs() : mixed
- Move IDs.
- parseLimitOffset() : array<string|int, mixed>
- prepareQueries() : array<string|int, mixed>
- Get contribution ids in entity tables.
- runQueries() : array<string|int, mixed>
- Run queries.
- toLimit() : string
Properties
$label
protected
string
$label
$name
protected
string
$name
Methods
__construct()
Class constructor.
public
__construct() : mixed
fillCustomInfo()
public
fillCustomInfo(mixed &$tables, mixed $extends) : mixed
Parameters
- $tables : mixed
- $extends : mixed
fillTempTable()
Execute a query and write out a page worth of matches to $detailTable.
public
fillTempTable(mixed $queryText, mixed $entityIDTableName, mixed $toTable, mixed $queryLimit, mixed $detailLimit) : array<string|int, mixed>
Parameters
- $queryText : mixed
-
A string of text to search for.
- $entityIDTableName : mixed
-
A temporary table into which we can write a list of all matching IDs.
- $toTable : mixed
- $queryLimit : mixed
-
overall limit (applied when building $entityIDTableName) NULL if no limit; or array(0 => $limit, 1 => $offset)
- $detailLimit : mixed
-
final limit (applied when building $detailTable) NULL if no limit; or array(0 => $limit, 1 => $offset)
Tags
Return values
array<string|int, mixed> —keys: match-descriptor
- count: int
getLabel()
Get label.
public
getLabel() : string
Return values
stringgetName()
Get name.
public
getName() : string
Return values
stringisActive()
Check if search is permitted.
public
isActive() : bool
Return values
boolmatchText()
Create a SQL expression for matching against a list of.
public
matchText(string $table, array<string|int, mixed>|string $fullTextFields, string $queryText) : string
text columns.
Parameters
- $table : string
-
Eg "civicrm_note" or "civicrm_note mynote".
- $fullTextFields : array<string|int, mixed>|string
-
list of field names
- $queryText : string
Return values
string —SQL, eg "MATCH (col1) AGAINST (queryText)" or "col1 LIKE '%queryText%'"
moveFileIDs()
For any records in $toTable that originated with this query, append file information.
public
moveFileIDs(string $toTable, string $parentIdColumn, array<string|int, mixed> $files) : mixed
Parameters
- $toTable : string
- $parentIdColumn : string
- $files : array<string|int, mixed>
-
See return format of CRM_Core_FileSearchInterface::search.
moveIDs()
Move IDs.
public
moveIDs(string $fromTable, string $toTable, int $limit) : mixed
Parameters
- $fromTable : string
- $toTable : string
- $limit : int
parseLimitOffset()
public
parseLimitOffset(array<string|int, mixed>|int $limit) : array<string|int, mixed>
Parameters
- $limit : array<string|int, mixed>|int
Return values
array<string|int, mixed> —(0 => $limit, 1 => $offset)
prepareQueries()
Get contribution ids in entity tables.
public
prepareQueries(string $queryText, string $entityIDTableName) : array<string|int, mixed>
Parameters
- $queryText : string
- $entityIDTableName : string
Return values
array<string|int, mixed> —list tables/queries (for runQueries)
runQueries()
Run queries.
public
runQueries(string $queryText, array<string|int, mixed> &$tables, string $entityIDTableName, int $limit) : array<string|int, mixed>
Parameters
- $queryText : string
- $tables : array<string|int, mixed>
-
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
- $entityIDTableName : string
- $limit : int
Tags
Return values
array<string|int, mixed> —Keys: match-descriptor
- count: int
- files: NULL | array
toLimit()
public
toLimit(int|array<string|int, mixed> $limit) : string
Parameters
- $limit : int|array<string|int, mixed>
Tags
Return values
string —SQL