BasicFilter
class BasicFilter extends TwillBaseFilter (View source)
Constants
OPTION_ALL |
|
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 Collection|null | $options | ||
protected mixed | $appliedValue | ||
protected bool | $includeAll | ||
protected mixed | $default |
Methods
No description
Set the query string to use in the url
When passing a boolean, the filter will only be enabled when it is true.
When passing a boolean, the filter will be disabled when it is true.
Sets the applied value of the filter.
This removes the "All" option.
Sets the options that can be used to select, it should be a key->value collection.
Set the default value of the filter.
No description
No description
Details
Builder
applyFilter(Builder $builder)
No description
final
__construct()
No description
static TwillBaseFilter
make()
No description
TwillBaseFilter
label(string $label)
Set a label to use for the filter.
string|null
getLabel()
No description
TwillBaseFilter
queryString(string $queryString)
Set the query string to use in the url
string
getQueryString()
No description
TwillBaseFilter
onlyEnableWhen(bool $enable = true)
When passing a boolean, the filter will only be enabled when it is true.
TwillBaseFilter
disable(bool $disable = true)
When passing a boolean, the filter will be disabled when it is true.
TwillBaseFilter
apply(Closure $closure)
The closure to apply the filter.
bool
isEnabled()
No description
BasicFilter
withFilterValue(mixed $value)
Sets the applied value of the filter.
This is usually something you do not want to run manually.
BasicFilter
withoutIncludeAll(bool $removeIncludeAll = true)
This removes the "All" option.
BasicFilter
options(Collection $options)
Sets the options that can be used to select, it should be a key->value collection.
BasicFilter
default(mixed $default)
Set the default value of the filter.
mixed
getDefaultValue()
No description
string
getKey()
No description
Collection
getOptions(ModuleRepository $repository)
No description