MediaWiki  1.29.1
ChangesListBooleanFilterGroup Class Reference

If the group is active, any unchecked filters will translate to hide parameters in the URL. More...

Inheritance diagram for ChangesListBooleanFilterGroup:
Collaboration diagram for ChangesListBooleanFilterGroup:

Public Member Functions

 __construct (array $groupDefinition)
 Create a new filter group with the specified configuration. More...
 
 isPerGroupRequestParameter ()
 Check whether the URL parameter is for the group, or for individual filters.Defaults can also be defined on the group if and only if this is true.
Returns
bool True if and only if the URL parameter is per-group
More...
 
 registerFilter (ChangesListBooleanFilter $filter)
 Registers a filter in this group. More...
 
- Public Member Functions inherited from ChangesListFilterGroup
 anySelected (FormOptions $opts)
 Check if any filter in this group is selected. More...
 
 conflictsWith ( $other, $globalKey, $forwardKey, $backwardKey)
 Marks that the given ChangesListFilterGroup or ChangesListFilter conflicts with this object. More...
 
 getConflictingFilters ()
 Get filters conflicting with this filter group. More...
 
 getConflictingGroups ()
 Get groups conflicting with this filter group. More...
 
 getFilter ( $name)
 Get filter by name. More...
 
 getFilters ()
 
 getJsData ()
 Gets the JS data in the format required by the front-end of the structured UI. More...
 
 getName ()
 
 getPriority ()
 
 getTitle ()
 
 getType ()
 
 setUnidirectionalConflict ( $other, $globalDescription, $contextDescription)
 Marks that the given ChangesListFilterGroup or ChangesListFilter conflicts with this object. More...
 

Public Attributes

const TYPE = 'send_unselected_if_any'
 Type marker, used by JavaScript. More...
 
- Public Attributes inherited from ChangesListFilterGroup
const DEFAULT_PRIORITY = -100
 
const RESERVED_NAME_CHAR = '_'
 

Protected Member Functions

 createFilter (array $filterDefinition)
 Creates a filter of the appropriate type for this group, from the definition.
Parameters
array$filterDefinitionFilter definition
Returns
ChangesListFilter Filter
More...
 

Additional Inherited Members

- Protected Attributes inherited from ChangesListFilterGroup
 $conflictingFilters = []
 
 $conflictingGroups = []
 
 $filters
 Associative array of filters, as ChangesListFilter objects, with filter name as key. More...
 
 $isFullCoverage
 Whether this group is full coverage. More...
 
 $name
 Name (internal identifier) More...
 
 $priority
 Priority integer. More...
 
 $title
 i18n key for title More...
 
 $type
 Type, from a TYPE constant of a subclass. More...
 
 $whatsThisBody
 i18n key for body of What's This? More...
 
 $whatsThisHeader
 i18n key for header of What's This? More...
 
 $whatsThisLinkText
 i18n key for What's This? link More...
 
 $whatsThisUrl
 URL of What's This? link. More...
 

Detailed Description

If the group is active, any unchecked filters will translate to hide parameters in the URL.

E.g. if 'Human (not bot)' is checked, but 'Bot' is unchecked, hidebots=1 will be sent.

Since
1.29

Definition at line 10 of file ChangesListBooleanFilterGroup.php.

Constructor & Destructor Documentation

◆ __construct()

ChangesListBooleanFilterGroup::__construct ( array  $groupDefinition)

Create a new filter group with the specified configuration.

Parameters
array$groupDefinitionConfiguration of group
  • $groupDefinition['name'] string Group name
  • $groupDefinition['title'] string i18n key for title (optional, can be omitted
  • only if none of the filters in the group display in the structured UI)
  • $groupDefinition['priority'] int Priority integer. Higher means higher in the
  • group list.
  • $groupDefinition['filters'] array Numeric array of filter definitions, each of which
  • is an associative array to be passed to the filter constructor. However,
  • 'priority' is optional for the filters. Any filter that has priority unset
  • will be put to the bottom, in the order given.

Reimplemented from ChangesListFilterGroup.

Definition at line 30 of file ChangesListBooleanFilterGroup.php.

References TYPE.

Member Function Documentation

◆ createFilter()

ChangesListBooleanFilterGroup::createFilter ( array  $filterDefinition)
protected

Creates a filter of the appropriate type for this group, from the definition.

Parameters
array$filterDefinitionFilter definition
Returns
ChangesListFilter Filter

Reimplemented from ChangesListFilterGroup.

Definition at line 40 of file ChangesListBooleanFilterGroup.php.

◆ isPerGroupRequestParameter()

ChangesListBooleanFilterGroup::isPerGroupRequestParameter ( )

Check whether the URL parameter is for the group, or for individual filters.Defaults can also be defined on the group if and only if this is true.

Returns
bool True if and only if the URL parameter is per-group

Reimplemented from ChangesListFilterGroup.

Definition at line 56 of file ChangesListBooleanFilterGroup.php.

◆ registerFilter()

ChangesListBooleanFilterGroup::registerFilter ( ChangesListBooleanFilter  $filter)

Registers a filter in this group.

Parameters
ChangesListBooleanFilter$filterChangesListBooleanFilter

Definition at line 49 of file ChangesListBooleanFilterGroup.php.

References ChangesListFilter\getName().

Member Data Documentation

◆ TYPE

const ChangesListBooleanFilterGroup::TYPE = 'send_unselected_if_any'

The documentation for this class was generated from the following file: