class Filter implements ExtenderInterface

Methods

__construct($filtererClass)

No description

addFilter(string $filterClass)

<p>Add a filter to run when the filtererClass is filtered.</p>

addFilterMutator(callable|string $callback)

<p>Add a callback through which to run all filter queries after filters have been applied.</p>

extend(Container $container, Extension $extension = null)

No description

Details

__construct($filtererClass)

Parameters

$filtererClass

Filter addFilter(string $filterClass)

<p>Add a filter to run when the filtererClass is filtered.</p>

Parameters

string $filterClass

Return Value

Filter

Filter addFilterMutator(callable|string $callback)

<p>Add a callback through which to run all filter queries after filters have been applied.</p>

Parameters

callable|string $callback <p>The callback can be a closure or an invokable class, and should accept:</p> <ul> <li>Flarum\Filter\FilterState $filter</li> <li>Flarum\Query\QueryCriteria $criteria</li> </ul> <p>The callable should return void.</p>

Return Value

Filter

extend(Container $container, Extension $extension = null)

Parameters

Container $container
Extension $extension