4 * If the group is active, any unchecked filters will
5 * translate to hide parameters in the URL. E.g. if 'Human (not bot)' is checked,
6 * but 'Bot' is unchecked, hidebots=1 will be sent.
10 class ChangesListBooleanFilterGroup
extends ChangesListFilterGroup
{
12 * Type marker, used by JavaScript
14 const TYPE
= 'send_unselected_if_any';
17 * Create a new filter group with the specified configuration
19 * @param array $groupDefinition Configuration of group
20 * * $groupDefinition['name'] string Group name
21 * * $groupDefinition['title'] string i18n key for title (optional, can be omitted
22 * * only if none of the filters in the group display in the structured UI)
23 * * $groupDefinition['priority'] int Priority integer. Higher means higher in the
25 * * $groupDefinition['filters'] array Numeric array of filter definitions, each of which
26 * * is an associative array to be passed to the filter constructor. However,
27 * * 'priority' is optional for the filters. Any filter that has priority unset
28 * * will be put to the bottom, in the order given.
30 public function __construct( array $groupDefinition ) {
31 $groupDefinition['isFullCoverage'] = true;
32 $groupDefinition['type'] = self
::TYPE
;
34 parent
::__construct( $groupDefinition );
40 protected function createFilter( array $filterDefinition ) {
41 return new ChangesListBooleanFilter( $filterDefinition );
45 * Registers a filter in this group
47 * @param ChangesListBooleanFilter $filter ChangesListBooleanFilter
49 public function registerFilter( ChangesListBooleanFilter
$filter ) {
50 $this->filters
[$filter->getName()] = $filter;
56 public function isPerGroupRequestParameter() {