Filter
class Filter
筛选器
Properties
static protected array | $supports | ||
bool | $expand | 是否展开 | |
protected | $export | ||
protected Model | $model | 当前的模型 | |
protected array | $filters | ||
protected string | $action | 搜索表单的筛选条件 | |
protected string | $view | ||
protected string | $filterId | ||
protected string | $name | ||
protected Collection | $scopes | ||
protected Layout | $layout | 布局 | |
protected bool | $thisFilterLayoutOnly | Set this filter only in the layout. |
|
protected array | $layoutOnlyFilterColumns | Columns of filter that are layout-only. |
|
protected mixed | $primaryKey | Primary key of giving model. |
Methods
No description
Get filter ID.
Set ID of search form.
No description
No description
Remove filter by filter id.
Get all conditions of the filters.
Set this filter layout only.
Get all filters.
No description
Get all filter scopes.
Get current scope.
Execute the filter with conditions.
No description
Get the string contents of the filter view.
Get url without filter queryString.
Get url without scope queryString.
No description
Generate a filter object and add to grid.
Initialize filter layout.
No description
Get scope conditions.
Get full url without query strings.
No description
No description
Details
at line 170
__construct(Model $model)
Create a new filter instance.
at line 185
static
extend(string $name, string $filterClass)
No description
at line 201
Filter
setAction(string $action)
Set action of search form.
at line 213
Model
getModel()
Get grid model.
at line 228
string
getFilterId()
Get filter ID.
at line 240
$this
setFilterId(string $id)
Set ID of search form.
at line 250
string
getName()
No description
at line 260
Filter
setName(string $name)
No description
at line 267
enableExport()
No description
at line 278
removeFilterByID(mixed $id)
Remove filter by filter id.
at line 290
array
conditions()
Get all conditions of the filters.
at line 329
$this
layoutOnly()
Set this filter layout only.
at line 343
FilterItem
use(FilterItem $filter)
Use a custom filter.
at line 353
array
filters()
Get all filters.
at line 364
mixed
scope(string $key, string $label = '')
No description
at line 376
Collection
getScopes()
Get all filter scopes.
at line 386
Scope|null
getCurrentScope()
Get current scope.
at line 417
array|Collection|mixed
execute(bool $toArray = true)
Execute the filter with conditions.
at line 438
bool
chunk(callable $callback, int $count = 100)
No description
at line 453
View|string
render()
Get the string contents of the filter view.
at line 471
string
urlWithoutFilters()
Get url without filter queryString.
at line 500
string
urlWithoutScopes()
Get url without scope queryString.
at line 512
FilterItem
resolveFilter(string $abstract, array $arguments)
No description
at line 529
FilterItem|$this
__call(string $method, array $arguments)
Generate a filter object and add to grid.
at line 544
protected
initLayout()
Initialize filter layout.
at line 553
protected void
sanitizeInputs($inputs)
No description
at line 574
protected FilterItem
addFilter(FilterItem $filter)
Add a filter to grid.
at line 593
protected array
scopeConditions()
Get scope conditions.
at line 609
protected string
fullUrlWithoutQuery(Arrayable|array|string $keys)
Get full url without query strings.
at line 62
Equal
equal(mixed $column, mixed $label)
No description
at line 62
NotEqual
notEqual(mixed $column, mixed $label)
No description
at line 62
Like
like(mixed $column, mixed $label)
No description
at line 62
StartsWith
startsWith(mixed $column, mixed $label)
No description
at line 62
EndsWith
endsWith(mixed $column, mixed $label)
No description
at line 62
Gt
gt(mixed $column, mixed $label)
No description
at line 62
Gte
gte(mixed $column, mixed $label)
No description
at line 62
Lt
lt(mixed $column, mixed $label)
No description
at line 62
Lte
lte(mixed $column, mixed $label)
No description
at line 62
Between
between(mixed $column, mixed $label)
No description
at line 62
BetweenDate
betweenDate(mixed $column, mixed $label)
No description
at line 62
In
in(mixed $column, mixed $label)
No description
at line 62
NotIn
notIn(mixed $column, mixed $label)
No description
at line 62
Where
where(mixed $callback, mixed $label, mixed $column)
No description
at line 62
Date
date(mixed $column, mixed $label)
No description
at line 62
Month
month(mixed $column, mixed $label)
No description
at line 62
Year
year(mixed $column, mixed $label)
No description
at line 62
Hidden
hidden(mixed $name)
No description
at line 62
Query
query(mixed $name, mixed $label)
No description
at line 62
Group
group(mixed $column, mixed $label, mixed $builder)
No description