Update a query to match the text with a fulltext index
Possible template method: If overridden, children do not need to call this method if they update the $query themselves.
Note the following additional properties are available from the $query argument:
$query->field
(Field): Field instance that being referred to match.$query->group
(string): Original group of the field in the selector (when applicable).$query->selector
(Selector): Original Selector object (matching the $field).$query->selectors
(Selectors): Original Selectors object (matching $field and others).$query->parentQuery
(DatabaseQuerySelect): Parent database query that $query will be merged into.$query->pageFinder
(PageFinder): The PageFinder instance that initiated the query, for additional info.
Usage
$databaseQuerySelect = $fieldtypeText->getMatchQuery(PageFinderDatabaseQuerySelect $query, string $table, string $subfield, string $operator, $value);
Arguments
Name | Type(s) | Description |
---|---|---|
query | PageFinderDatabaseQuerySelect | |
table | string | The table name to use |
subfield | string | Name of the subfield (typically 'data', unless selector explicitly specified another) |
operator | string | The comparison operator.
|
value | int, string | Value to find.
|
Return value
DatabaseQuerySelect
$query
Exceptions
Method can throw exceptions on error:
WireException
FieldtypeText methods and properties
API reference based on ProcessWire core version 3.0.236