new ChangeFilters()

Description

Allows to change available filters after plugin initialization.

Methods


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


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


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:plugins.ChangeFilters.setFilters method

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

afterSetFilters

Description

After module:plugins.ChangeFilters.setFilters method

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