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.
29 * * $groupDefinition['whatsThisHeader'] string i18n key for header of "What's
30 * This" popup (optional).
31 * * $groupDefinition['whatsThisBody'] string i18n key for body of "What's This"
33 * * $groupDefinition['whatsThisUrl'] string URL for main link of "What's This"
35 * * $groupDefinition['whatsThisLinkText'] string i18n key of text for main link of
36 * "What's This" popup (optional).
38 public function __construct( array $groupDefinition ) {
39 $groupDefinition['isFullCoverage'] = true;
40 $groupDefinition['type'] = self
::TYPE
;
42 parent
::__construct( $groupDefinition );
48 protected function createFilter( array $filterDefinition ) {
49 return new ChangesListBooleanFilter( $filterDefinition );
53 * Registers a filter in this group
55 * @param ChangesListBooleanFilter $filter ChangesListBooleanFilter
57 public function registerFilter( ChangesListBooleanFilter
$filter ) {
58 $this->filters
[$filter->getName()] = $filter;
64 public function isPerGroupRequestParameter() {