final class FilterWidget extends FilterPlugin

deprecated 4.0-dev

Traits

Properties

protected Collection $scopes 全局范围 from  UseScopes
protected Collection $items 表单内的表单条目集合 from  FilterPlugin

Methods

mixed
scope(string $key, string $label)

添加全局范围, 在添加全局范围之后, 如果不传入 Scope, 则默认为第一个 Scope

Collection
getScopes()

Get all filter scopes.

Collection
getScopesStruct()

范围结构

Scope|null
getCurrentScope()

获取当前的Scope, 支持未传入

__construct()

No description

addItem(FilterItem $item)

添加搜索条件

Collection
items()

获取表单的所有字段

FormItem|$this
__call(string $method, array $arguments = [])

Generate items and append to filter list

array
conditions()

查询条件

struct()

返回结构 规则解析参考 : https://github.com/yiminghe/async-validator

void
action(int $width = 4, bool $export = false)

按钮的宽度(默认 4), 这里不会处理按钮的位置

bool
getEnableExport()

是否启用了导出

array
filterConditions()

Get all conditions of the filters.

where(Closure $query, mixed $label, mixed $column)

自定义查询条件

equal(mixed $column, mixed $label)

相等

notEqual(mixed $column, mixed $label)

不等

like(mixed $column, mixed $label)

匹配搜索

startsWith(mixed $column, mixed $label)

前半部分匹配

endsWith(mixed $column, mixed $label)

后半部分匹配

Gt
gt(mixed $column, mixed $label)

大于

Gte
gte(mixed $column, mixed $label)

大于等于

Lt
lt(mixed $column, mixed $label)

小于

Lte
lte(mixed $column, mixed $label)

小于

In
in(mixed $column, mixed $label)

包含

notIn(mixed $column, mixed $label)

不包含

between(mixed $column, mixed $label)

介于...

Details

in UseScopes at line 24
mixed scope(string $key, string $label)

添加全局范围, 在添加全局范围之后, 如果不传入 Scope, 则默认为第一个 Scope

Parameters

string $key
string $label

Return Value

mixed

in UseScopes at line 36
Collection getScopes()

Get all filter scopes.

Return Value

Collection

in UseScopes at line 45
Collection getScopesStruct()

范围结构

Return Value

Collection

in UseScopes at line 57
Scope|null getCurrentScope()

获取当前的Scope, 支持未传入

Return Value

Scope|null

in FilterPlugin at line 60
__construct()

No description

in FilterPlugin at line 71
FilterPlugin addItem(FilterItem $item)

添加搜索条件

Parameters

FilterItem $item

Return Value

FilterPlugin

in FilterPlugin at line 81
Collection items()

获取表单的所有字段

Return Value

Collection

in FilterPlugin at line 95
FormItem|$this __call(string $method, array $arguments = [])

Generate items and append to filter list

Parameters

string $method 类型
array $arguments 传入的参数

Return Value

FormItem|$this

Exceptions

ApplicationException
ReflectionException

in FilterPlugin at line 119
array conditions()

查询条件

Return Value

array

in FilterPlugin at line 132
struct()

返回结构 规则解析参考 : https://github.com/yiminghe/async-validator

in FilterPlugin at line 154
void action(int $width = 4, bool $export = false)

按钮的宽度(默认 4), 这里不会处理按钮的位置

Parameters

int $width 宽度
bool $export 是否允许导出

Return Value

void

in FilterPlugin at line 165
bool getEnableExport()

是否启用了导出

Return Value

bool

in FilterPlugin at line 176
array filterConditions()

Get all conditions of the filters.

Return Value

array

in FilterPlugin at line 43
Where where(Closure $query, mixed $label, mixed $column)

自定义查询条件

Parameters

Closure $query
mixed $label
mixed $column

Return Value

Where

in FilterPlugin at line 43
Equal equal(mixed $column, mixed $label)

相等

Parameters

mixed $column
mixed $label

Return Value

Equal

in FilterPlugin at line 43
NotEqual notEqual(mixed $column, mixed $label)

不等

Parameters

mixed $column
mixed $label

Return Value

NotEqual

in FilterPlugin at line 43
Like like(mixed $column, mixed $label)

匹配搜索

Parameters

mixed $column
mixed $label

Return Value

Like

in FilterPlugin at line 43
StartsWith startsWith(mixed $column, mixed $label)

前半部分匹配

Parameters

mixed $column
mixed $label

Return Value

StartsWith

in FilterPlugin at line 43
EndsWith endsWith(mixed $column, mixed $label)

后半部分匹配

Parameters

mixed $column
mixed $label

Return Value

EndsWith

in FilterPlugin at line 43
Gt gt(mixed $column, mixed $label)

大于

Parameters

mixed $column
mixed $label

Return Value

Gt

in FilterPlugin at line 43
Gte gte(mixed $column, mixed $label)

大于等于

Parameters

mixed $column
mixed $label

Return Value

Gte

in FilterPlugin at line 43
Lt lt(mixed $column, mixed $label)

小于

Parameters

mixed $column
mixed $label

Return Value

Lt

in FilterPlugin at line 43
Lte lte(mixed $column, mixed $label)

小于

Parameters

mixed $column
mixed $label

Return Value

Lte

in FilterPlugin at line 43
In in(mixed $column, mixed $label)

包含

Parameters

mixed $column
mixed $label

Return Value

In

in FilterPlugin at line 43
NotIn notIn(mixed $column, mixed $label)

不包含

Parameters

mixed $column
mixed $label

Return Value

NotIn

in FilterPlugin at line 43
Between between(mixed $column, mixed $label)

介于...

Parameters

mixed $column
mixed $label

Return Value

Between