Description

Allows to change available filters after plugin initialization.

Methods


<static> addFilter( newFilters [, position ] )

Description

Adds a new filter to the builder

Parameters
Name Type Attributes Default Description
newFilters QueryBuilder.Filter | Array.<Filter>
position int | string <optional>
#end

index or '#start' or '#end'

Throws

ChangeFilterError


<static> removeFilter( filterIds [, deleteOrphans ] )

Description

Removes a filter from the builder

Parameters
Name Type Attributes Default Description
filterIds string | Array.<string>
deleteOrphans boolean <optional>
false

delete rules using old filters

Throws

ChangeFilterError


<static> setFilters( [ deleteOrphans ], filters )

Description

Change the filters of the builder

Parameters
Name Type Attributes Default Description
deleteOrphans boolean <optional>
false

delete rules using old filters

filters Array.<QueryBuilder>
Throws

ChangeFilterError

Events


changer:setFilters

Description

Modifies the filters before module:ChangeFiltersPlugin.setFilters method

Parameters
Name Type Description
filters Array.<QueryBuilder.Filter>
Returns

afterSetFilters

Description
Parameters
Name Type Description
filters Array.<QueryBuilder.Filter>