Field
class Field
Filter field
Properties
protected string | $key | Filter key | |
protected string | $value | Filter value | |
protected Closure | $callback | Possible query callback | |
protected string | $baseClassname | Base classname | |
protected array | $types | Available comparison types and their query counterparts | |
protected string | $wildcard | Query wildcard character |
Methods
__construct(string $key, string $value, Closure|null $callback = null)
Create a new field instance
void
getKey()
Get field key
string
getType()
Get field comparison type based on field value
boolean
isIdKey()
Is filter key an id key
integer
getModelId(string $id)
Resolve model id from key
string|null|array
getValue()
Get field value
Builder
apply(Builder $query)
Apply filter to query
void
setBaseClassname(string $classname)
Set base classname to use against id-filters
Details
at line 76
__construct(string $key, string $value, Closure|null $callback = null)
Create a new field instance
at line 88
protected void
getKey()
Get field key
at line 98
protected string
getType()
Get field comparison type based on field value
at line 113
protected boolean
isIdKey()
Is filter key an id key
at line 124
protected integer
getModelId(string $id)
Resolve model id from key
at line 152
protected string|null|array
getValue()
Get field value
at line 197
Builder
apply(Builder $query)
Apply filter to query
at line 232
void
setBaseClassname(string $classname)
Set base classname to use against id-filters