abstract class FilterItem implements Structable

过滤条目

Properties

protected $width
read-only $name 当前列的名称
protected string $type 默认
protected string $label

Label of presenter.

read-only $value 输入值
protected array|string|null $defaultValue 默认值
protected string $query

Query for filter.

protected array $attr 属性
protected FilterItem $parent

Methods

__construct(string|Closure $column = '', string $label = '')

AbstractFilter constructor.

width($width)

设置列宽度

setParent(FilterItem $filter)

No description

array|mixed|null
condition(array $inputs)

获取查询条件

struct()

可结构化并返回

__get($attr)

No description

default(null $default = null)

Set default value for filter.

array|string
getValue()

Get value of current filter.

void
defaultValue(array $inputs)

默认值

array
sanitizeInputs($inputs)

No description

string
formatLabel(string $label)

格式化 Label

array
buildCondition()

Build conditions of filter.

array
buildRelationQuery()

Build query condition of model relation.

setAttribute(string|array $attr, mixed $value = '')

字段属性

Details

at line 76
__construct(string|Closure $column = '', string $label = '')

AbstractFilter constructor.

Parameters

string|Closure $column
string $label

at line 86
FilterItem width($width)

设置列宽度

Parameters

$width

Return Value

FilterItem

at line 95
setParent(FilterItem $filter)

No description

Parameters

FilterItem $filter

at line 106
array|mixed|null condition(array $inputs)

获取查询条件

Parameters

array $inputs

Return Value

array|mixed|null

at line 121
struct()

可结构化并返回

at line 135
__get($attr)

No description

Parameters

$attr

at line 150
FilterItem default(null $default = null)

Set default value for filter.

Parameters

null $default

Return Value

FilterItem

at line 164
array|string getValue()

Get value of current filter.

Return Value

array|string

at line 174
protected void defaultValue(array $inputs)

默认值

Parameters

array $inputs

Return Value

void

at line 189
protected array sanitizeInputs($inputs)

No description

Parameters

$inputs

Return Value

array

at line 210
protected string formatLabel(string $label)

格式化 Label

Parameters

string $label

Return Value

string

at line 222
protected array buildCondition()

Build conditions of filter.

Return Value

array

at line 239
protected array buildRelationQuery()

Build query condition of model relation.

Return Value

array

at line 260
protected FilterItem setAttribute(string|array $attr, mixed $value = '')

字段属性

Parameters

string|array $attr
mixed $value

Return Value

FilterItem