abstract class FilterItem

Class AbstractFilter.

Properties

Collection $group
protected array|string $id

Element id.

protected string $label

Label of presenter.

protected array|string $value
protected array|string $defaultValue
protected string $column
protected Presenter|null $presenter

Presenter object.

protected string $query

Query for filter.

protected Filter $parent
protected string $view

Methods

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

AbstractFilter constructor.

setParent(Filter $filter)

No description

bool
isRender()

是否可以渲染

FilterItem[]|mixed
siblings(null $index = null)

Get siblings of current filter.

FilterItem[]|mixed
previous(int $step = 1)

Get previous filter.

FilterItem[]|mixed
next(int $step = 1)

Get next filter.

array|mixed|null|void
condition(array $inputs)

Get query condition from filter.

select(array|Collection $options = [])

Select filter.

multipleSelect(array|Collection $options = [])

No description

radio(array|Collection $options = [])

No description

View|string
render()

Render this filter.

mixed
__call($method, $params)

No description

$this
default(null $default = null)

Set default value for filter.

array|string
getId()

Get element id.

setId(string $id)

Set element id.

string
getColumn()

Get column name of current filter.

array|string
getValue()

Get value of current filter.

mixed
setPresenter(Presenter $presenter)

Set presenter object of filter.

setupDefaultPresenter()

Setup default presenter.

string
formatLabel(string $label)

Format label.

string
formatName(string $column)

Format name.

array|string
formatId(string $column)

Format id.

mixed
buildCondition()

Build conditions of filter.

array
buildRelationQuery()

Build query condition of model relation.

array
variables()

Variables for filter view.

url()

No description

email()

No description

integer()

No description

decimal(mixed $options)

No description

currency(mixed $options)

No description

percentage(mixed $options)

No description

ip()

No description

mac()

No description

mobile(mixed $mask)

No description

inputmask(mixed $options, mixed $icon)

No description

placeholder(mixed $placeholder)

No description

Details

at line 99
__construct($column, string $label = '')

AbstractFilter constructor.

Parameters

$column
string $label

at line 112
FilterItem setParent(Filter $filter)

No description

Parameters

Filter $filter

Return Value

FilterItem

at line 123
bool isRender()

是否可以渲染

Return Value

bool

at line 135
FilterItem[]|mixed siblings(null $index = null)

Get siblings of current filter.

Parameters

null $index

Return Value

FilterItem[]|mixed

at line 151
FilterItem[]|mixed previous(int $step = 1)

Get previous filter.

Parameters

int $step

Return Value

FilterItem[]|mixed

at line 165
FilterItem[]|mixed next(int $step = 1)

Get next filter.

Parameters

int $step

Return Value

FilterItem[]|mixed

at line 179
array|mixed|null|void condition(array $inputs)

Get query condition from filter.

Parameters

array $inputs

Return Value

array|mixed|null|void

at line 199
Select select(array|Collection $options = [])

Select filter.

Parameters

array|Collection $options

Return Value

Select

at line 209
MultipleSelect multipleSelect(array|Collection $options = [])

No description

Parameters

array|Collection $options

Return Value

MultipleSelect

at line 219
Radio radio(array|Collection $options = [])

No description

Parameters

array|Collection $options

Return Value

Radio

at line 230
View|string render()

Render this filter.

Return Value

View|string

at line 245
mixed __call($method, $params)

No description

Parameters

$method
$params

Return Value

mixed

Exceptions

Exception

at line 261
$this default(null $default = null)

Set default value for filter.

Parameters

null $default

Return Value

$this

at line 275
array|string getId()

Get element id.

Return Value

array|string

at line 287
FilterItem setId(string $id)

Set element id.

Parameters

string $id

Return Value

FilterItem

at line 298
string getColumn()

Get column name of current filter.

Return Value

string

at line 310
array|string getValue()

Get value of current filter.

Return Value

array|string

at line 320
mixed setPresenter(Presenter $presenter)

Set presenter object of filter.

Parameters

Presenter $presenter

Return Value

mixed

at line 331
protected Text setupDefaultPresenter()

Setup default presenter.

Return Value

Text

at line 343
protected string formatLabel(string $label)

Format label.

Parameters

string $label

Return Value

string

at line 357
protected string formatName(string $column)

Format name.

Parameters

string $column

Return Value

string

at line 383
protected array|string formatId(string $column)

Format id.

Parameters

string $column

Return Value

array|string

at line 393
protected mixed buildCondition()

Build conditions of filter.

Return Value

mixed

at line 409
protected array buildRelationQuery()

Build query condition of model relation.

Return Value

array

at line 429
protected array variables()

Variables for filter view.

Return Value

array

at line 32
Text url()

No description

Return Value

Text

at line 32
Text email()

No description

Return Value

Text

at line 32
Text integer()

No description

Return Value

Text

at line 32
Text decimal(mixed $options)

No description

Parameters

mixed $options

Return Value

Text

at line 32
Text currency(mixed $options)

No description

Parameters

mixed $options

Return Value

Text

at line 32
Text percentage(mixed $options)

No description

Parameters

mixed $options

Return Value

Text

at line 32
Text ip()

No description

Return Value

Text

at line 32
Text mac()

No description

Return Value

Text

at line 32
Text mobile(mixed $mask)

No description

Parameters

mixed $mask

Return Value

Text

at line 32
Text inputmask(mixed $options, mixed $icon)

No description

Parameters

mixed $options
mixed $icon

Return Value

Text

at line 32
Text placeholder(mixed $placeholder)

No description

Parameters

mixed $placeholder

Return Value

Text