abstract class TwillBaseFilter (View source)

Properties

protected string|null $label
protected string|null $queryString
protected bool $enabled
protected Closure|null $apply

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

Details

abstract 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