class QuickFilter extends TwillBaseFilter (View source)

Properties

protected string|null $label from  TwillBaseFilter
protected string|null $queryString from  TwillBaseFilter
protected bool $enabled from  TwillBaseFilter
protected Closure|null $apply from  TwillBaseFilter
protected Closure|null $amount
protected string|null $scope
protected bool $isDefaultQuickFilter

Methods

Builder
applyFilter(Builder $builder)

No description

__construct()

No description

static TwillBaseFilter
make()

No description

label(string $label)

Set a label to use for the filter.

string|null
getLabel()

No description

queryString(string $queryString)

Set the query string to use in the url

string
getQueryString()

No description

onlyEnableWhen(bool $enable = true)

When passing a boolean, the filter will only be enabled when it is true.

disable(bool $disable = true)

When passing a boolean, the filter will be disabled when it is true.

apply(Closure $closure)

The closure to apply the filter.

bool
isEnabled()

No description

amount(Closure $callback)

The callback that will tell the filter how many results there are.

bool
isDefault()

No description

default()

No description

scope(string $scope)

The scope to apply.

array
toArray()

No description

Details

Builder applyFilter(Builder $builder)

No description

Parameters

Builder $builder

Return Value

Builder

final __construct()

No description

static TwillBaseFilter make()

No description

Return Value

TwillBaseFilter

TwillBaseFilter label(string $label)

Set a label to use for the filter.

Parameters

string $label

Return Value

TwillBaseFilter

string|null getLabel()

No description

Return Value

string|null

TwillBaseFilter queryString(string $queryString)

Set the query string to use in the url

Parameters

string $queryString

Return Value

TwillBaseFilter

string getQueryString()

No description

Return Value

string

TwillBaseFilter onlyEnableWhen(bool $enable = true)

When passing a boolean, the filter will only be enabled when it is true.

Parameters

bool $enable

Return Value

TwillBaseFilter

TwillBaseFilter disable(bool $disable = true)

When passing a boolean, the filter will be disabled when it is true.

Parameters

bool $disable

Return Value

TwillBaseFilter

TwillBaseFilter apply(Closure $closure)

The closure to apply the filter.

Parameters

Closure $closure

Return Value

TwillBaseFilter

bool isEnabled()

No description

Return Value

bool

QuickFilter amount(Closure $callback)

The callback that will tell the filter how many results there are.

Parameters

Closure $callback

Return Value

QuickFilter

bool isDefault()

No description

Return Value

bool

QuickFilter default()

No description

Return Value

QuickFilter

QuickFilter scope(string $scope)

The scope to apply.

Parameters

string $scope

Return Value

QuickFilter

array toArray()

No description

Return Value

array