FilterCustom
extends SearchFilter
in package
Search filter object This is the is a custom filter.
Table of Contents
- $empty : bool
- Allow empty
- $field : mixed
- $is_or : bool
- Is or filter
- $value : mixed
- __construct() : mixed
- FilterCustom constructor.
- Field() : mixed
- Get the filed
- FilterQuery() : string
- Create query Convert to solr search query like length:[* TO 200]
- IsOr() : bool
- Is or connection?
- Matches() : bool
- SolariumQuery() : array<string|int, mixed>
- Create query Convert to solr search query like length:[* TO 200]
- ToQuery() : string|null
- Not supported
- ToSqlQuery() : SqlTerm|array<string|int, SqlTerm>|null
- Create a sql query based on this filter
Properties
$empty
Allow empty
protected
bool
$empty
= false
$field
protected
mixed
$field
$is_or
Is or filter
protected
bool
$is_or
= false
$value
protected
mixed
$value
Methods
__construct()
FilterCustom constructor.
public
__construct(string $value[, bool $is_or = false ]) : mixed
A lower filter with field and option to be equal
Parameters
- $value : string
-
The search value
- $is_or : bool = false
-
Merge with other filters with or
Return values
mixed —Field()
Get the filed
public
Field() : mixed
Return values
mixed —FilterQuery()
Create query Convert to solr search query like length:[* TO 200]
public
FilterQuery() : string
Return values
string —The search query
IsOr()
Is or connection?
public
IsOr() : bool
When merged with other filter use OR instead of AND
Return values
bool —Is or merge
Matches()
public
Matches(array<string|int, mixed>|object &$entity) : bool
Parameters
- $entity : array<string|int, mixed>|object
Return values
bool —SolariumQuery()
Create query Convert to solr search query like length:[* TO 200]
public
SolariumQuery() : array<string|int, mixed>
Return values
array<string|int, mixed> —The search query
ToQuery()
Not supported
public
ToQuery() : string|null
Return values
string|null —ToSqlQuery()
Create a sql query based on this filter
public
ToSqlQuery() : SqlTerm|array<string|int, SqlTerm>|null