Filter
class Filter extends FilterButton
筛选器
Properties
protected Grid | $grid | from AbstractTool | |
protected bool | $disabled | from AbstractTool | |
protected string | $view | ||
bool | $expand | 是否展开 | |
protected Model | $model | 当前的模型 | |
protected array | $filters | ||
protected string | $action | 搜索表单的筛选条件 | |
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. |
|
static protected array | $supports |
Methods
Get the string contents of the filter view.
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
No description
Get url without filter queryString.
Get url without scope queryString.
No description
Generate a filter object and add to grid.
No description
Initialize filter layout.
No description
Get scope conditions.
Get full url without query strings.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Details
in
AbstractTool at line 27
$this
disable(bool $disable = true)
Toggle this button.
in
AbstractTool at line 37
allowed()
If the tool is allowed.
in
AbstractTool at line 49
$this
setGrid(Grid $grid)
Set parent grid.
in
AbstractTool at line 59
Grid
getGrid()
No description
at line 414
render()
Get the string contents of the filter view.
in
AbstractTool at line 72
string
__toString()
No description
in
FilterButton at line 35
protected Filter
filter()
No description
at line 148
__construct(Model $model)
Create a new filter instance.
at line 166
Filter
setAction(string $action)
Set action of search form.
at line 178
Model
getModel()
Get grid model.
at line 193
string
getFilterId()
Get filter ID.
at line 205
$this
setFilterId(string $id)
Set ID of search form.
at line 215
string
getName()
No description
at line 225
$this
setName($name)
No description
at line 239
removeFilterByID(mixed $id)
Remove filter by filter id.
at line 251
array
conditions()
Get all conditions of the filters.
at line 290
$this
layoutOnly()
Set this filter layout only.
at line 304
AbstractFilter
use(AbstractFilter $filter)
Use a custom filter.
at line 314
array
filters()
Get all filters.
at line 325
mixed
scope(string $key, string $label = '')
No description
at line 337
Collection
getScopes()
Get all filter scopes.
at line 347
Scope|null
getCurrentScope()
Get current scope.
at line 378
array|Collection|mixed
execute(bool $toArray = true)
Execute the filter with conditions.
at line 399
bool
chunk(callable $callback, int $count = 100)
No description
at line 427
array
renderSkeleton()
No description
at line 449
string
urlWithoutFilters()
Get url without filter queryString.
at line 478
string
urlWithoutScopes()
Get url without scope queryString.
at line 490
AbstractFilter
resolveFilter(string $abstract, array $arguments)
No description
at line 507
AbstractFilter|$this
__call(string $method, array $arguments)
Generate a filter object and add to grid.
at line 520
static
extend(string $name, string $filterClass)
No description
at line 532
protected
initLayout()
Initialize filter layout.
at line 542
protected array
sanitizeInputs($inputs)
No description
at line 563
protected AbstractFilter
addFilter(AbstractFilter $filter)
Add a filter to grid.
at line 582
protected array
scopeConditions()
Get scope conditions.
at line 598
protected string
fullUrlWithoutQuery(Arrayable|array|string $keys)
Get full url without query strings.
at line 46
AbstractFilter
equal(mixed $column, mixed $label)
No description
at line 46
AbstractFilter
notEqual(mixed $column, mixed $label)
No description
at line 46
AbstractFilter
leftLike(mixed $column, mixed $label)
No description
at line 46
AbstractFilter
like(mixed $column, mixed $label)
No description
at line 46
AbstractFilter
contains(mixed $column, mixed $label)
No description
at line 46
AbstractFilter
startsWith(mixed $column, mixed $label)
No description
at line 46
AbstractFilter
endsWith(mixed $column, mixed $label)
No description
at line 46
AbstractFilter
ilike(mixed $column, mixed $label)
No description
at line 46
AbstractFilter
gt(mixed $column, mixed $label)
No description
at line 46
AbstractFilter
lt(mixed $column, mixed $label)
No description
at line 46
Between
between(mixed $column, mixed $label)
No description
at line 46
BetweenDate
betweenDate(mixed $column, mixed $label)
No description
at line 46
AbstractFilter
in(mixed $column, mixed $label)
No description
at line 46
AbstractFilter
notIn(mixed $column, mixed $label)
No description
at line 46
AbstractFilter
where(mixed $callback, mixed $label, mixed $column)
No description
at line 46
AbstractFilter
date(mixed $column, mixed $label)
No description
at line 46
AbstractFilter
day(mixed $column, mixed $label)
No description
at line 46
AbstractFilter
month(mixed $column, mixed $label)
No description
at line 46
AbstractFilter
year(mixed $column, mixed $label)
No description
at line 46
AbstractFilter
hidden(mixed $name, mixed $value)
No description
at line 46
AbstractFilter
group(mixed $column, mixed $label, mixed $builder)
No description