|
MediaWiki master
|
Represents a filter group (used on ChangesListSpecialPage and descendants) More...
Inherited by MediaWiki\RecentChanges\ChangesListBooleanFilterGroup, and MediaWiki\RecentChanges\ChangesListStringOptionsFilterGroup.

Public Member Functions | |
| __construct (array $groupDefinition) | |
| Create a new filter group with the specified configuration. | |
| addOptions (FormOptions $opts, $allowDefaults, $isStructuredFiltersEnabled) | |
| Add all the options represented by this filter group to $opts. | |
| anySelected (FormOptions $opts) | |
| Check if any filter in this group is selected. | |
| conflictsWith ( $other, string $globalKey, string $forwardKey, string $backwardKey) | |
| Marks that the given ChangesListFilterGroup or ChangesListFilter conflicts with this object. | |
| getConflictingFilters () | |
| Get filters conflicting with this filter group. | |
| getConflictingGroups () | |
| Get groups conflicting with this filter group. | |
| getFilter ( $name) | |
| Get filter by name. | |
| getFilters () | |
| getJsData () | |
| Gets the JS data in the format required by the front-end of the structured UI. | |
| getName () | |
| getPriority () | |
| getTitle () | |
| getType () | |
| modifyChangesListQuery (ChangesListQuery $query, FormOptions $opts, $isStructuredFiltersEnabled) | |
| Modifies the query to include the filter group. | |
| modifyQuery (IReadableDatabase $dbr, ChangesListSpecialPage $specialPage, &$tables, &$fields, &$conds, &$query_options, &$join_conds, FormOptions $opts, $isStructuredFiltersEnabled) | |
| Modifies the query to include the filter group (legacy interface). | |
| setDefault ( $defaultValue) | |
| Set the default for this filter group. | |
| setUnidirectionalConflict ( $other, $globalDescription, $contextDescription) | |
| Marks that the given ChangesListFilterGroup or ChangesListFilter conflicts with this object. | |
Protected Member Functions | |
| createFilter (array $filterDefinition) | |
| Creates a filter of the appropriate type for this group, from the definition. | |
Protected Attributes | |
| array | $conflictingFilters = [] |
| Array of associative arrays with conflict information. | |
| array | $conflictingGroups = [] |
| Array of associative arrays with conflict information. | |
| ChangesListFilter[] | $filters |
| Associative array of filters, as ChangesListFilter objects, with filter name as key. | |
| bool | $isFullCoverage |
| Whether this group is full coverage. | |
| string | $name |
| Name (internal identifier) | |
| int | $priority |
| Priority integer. | |
| string | $title |
| i18n key for title | |
| string | $type |
| Type, from a TYPE constant of a subclass. | |
| string null | $whatsThisBody |
| i18n key for body of What's This? | |
| string null | $whatsThisHeader |
| i18n key for header of What's This? | |
| string null | $whatsThisLinkText |
| i18n key for What's This? link | |
| string null | $whatsThisUrl |
| URL of What's This? link. | |
Represents a filter group (used on ChangesListSpecialPage and descendants)
Definition at line 28 of file ChangesListFilterGroup.php.
| MediaWiki\RecentChanges\ChangesListFilterGroup::__construct | ( | array | $groupDefinition | ) |
Create a new filter group with the specified configuration.
| array | $groupDefinition | Configuration of group
|
Reimplemented in MediaWiki\RecentChanges\ChangesListBooleanFilterGroup, and MediaWiki\RecentChanges\ChangesListStringOptionsFilterGroup.
Definition at line 147 of file ChangesListFilterGroup.php.
References MediaWiki\RecentChanges\ChangesListFilterGroup\createFilter().
|
abstract |
Add all the options represented by this filter group to $opts.
| FormOptions | $opts | |
| bool | $allowDefaults | |
| bool | $isStructuredFiltersEnabled |
Reimplemented in MediaWiki\RecentChanges\ChangesListBooleanFilterGroup, and MediaWiki\RecentChanges\ChangesListStringOptionsFilterGroup.
| MediaWiki\RecentChanges\ChangesListFilterGroup::anySelected | ( | FormOptions | $opts | ) |
Check if any filter in this group is selected.
| FormOptions | $opts |
Definition at line 419 of file ChangesListFilterGroup.php.
References MediaWiki\RecentChanges\ChangesListFilterGroup\getFilters(), and MediaWiki\RecentChanges\ChangesListFilter\isSelected().
Referenced by MediaWiki\RecentChanges\ChangesListFilter\activelyInConflictWithGroup().
| MediaWiki\RecentChanges\ChangesListFilterGroup::conflictsWith | ( | $other, | |
| string | $globalKey, | ||
| string | $forwardKey, | ||
| string | $backwardKey ) |
Marks that the given ChangesListFilterGroup or ChangesListFilter conflicts with this object.
WARNING: This means there is a conflict when both things are shown (not filtered out), even for the hide-based filters. So e.g. conflicting with 'hideanons' means there is a conflict if only anonymous users are shown.
| ChangesListFilterGroup | ChangesListFilter | $other | |
| string | $globalKey | i18n key for top-level conflict message |
| string | $forwardKey | i18n key for conflict message in this direction (when in UI context of $this object) |
| string | $backwardKey | i18n key for conflict message in reverse direction (when in UI context of $other object) |
Definition at line 228 of file ChangesListFilterGroup.php.
References MediaWiki\RecentChanges\ChangesListFilterGroup\setUnidirectionalConflict().
|
abstractprotected |
Creates a filter of the appropriate type for this group, from the definition.
| array | $filterDefinition |
Reimplemented in MediaWiki\RecentChanges\ChangesListBooleanFilterGroup, and MediaWiki\RecentChanges\ChangesListStringOptionsFilterGroup.
Referenced by MediaWiki\RecentChanges\ChangesListFilterGroup\__construct().
| MediaWiki\RecentChanges\ChangesListFilterGroup::getConflictingFilters | ( | ) |
Get filters conflicting with this filter group.
Definition at line 409 of file ChangesListFilterGroup.php.
| MediaWiki\RecentChanges\ChangesListFilterGroup::getConflictingGroups | ( | ) |
Get groups conflicting with this filter group.
Definition at line 400 of file ChangesListFilterGroup.php.
| MediaWiki\RecentChanges\ChangesListFilterGroup::getFilter | ( | $name | ) |
Get filter by name.
| string | $name | Filter name |
Definition at line 318 of file ChangesListFilterGroup.php.
References MediaWiki\RecentChanges\ChangesListFilterGroup\$name.
Referenced by MediaWiki\RecentChanges\ChangesListBooleanFilterGroup\setDefault().
| MediaWiki\RecentChanges\ChangesListFilterGroup::getFilters | ( | ) |
Definition at line 308 of file ChangesListFilterGroup.php.
References MediaWiki\RecentChanges\ChangesListFilterGroup\$filters.
Referenced by MediaWiki\RecentChanges\ChangesListBooleanFilterGroup\addOptions(), MediaWiki\RecentChanges\ChangesListFilterGroup\anySelected(), MediaWiki\RecentChanges\ChangesListFilterGroup\modifyChangesListQuery(), and MediaWiki\RecentChanges\ChangesListBooleanFilterGroup\modifyQuery().
| MediaWiki\RecentChanges\ChangesListFilterGroup::getJsData | ( | ) |
Gets the JS data in the format required by the front-end of the structured UI.
Reimplemented in MediaWiki\RecentChanges\ChangesListStringOptionsFilterGroup.
Definition at line 329 of file ChangesListFilterGroup.php.
References MediaWiki\RecentChanges\ChangesListFilterGroup\$isFullCoverage, MediaWiki\RecentChanges\ChangesListFilterGroup\$name, MediaWiki\RecentChanges\ChangesListFilterGroup\$priority, MediaWiki\RecentChanges\ChangesListFilterGroup\$title, MediaWiki\RecentChanges\ChangesListFilterGroup\$type, MediaWiki\RecentChanges\ChangesListFilterGroup\$whatsThisBody, MediaWiki\RecentChanges\ChangesListFilterGroup\$whatsThisHeader, MediaWiki\RecentChanges\ChangesListFilterGroup\$whatsThisLinkText, MediaWiki\RecentChanges\ChangesListFilterGroup\$whatsThisUrl, and MediaWiki\RecentChanges\ChangesListFilter\getPriority().
| MediaWiki\RecentChanges\ChangesListFilterGroup::getName | ( | ) |
Definition at line 279 of file ChangesListFilterGroup.php.
References MediaWiki\RecentChanges\ChangesListFilterGroup\$name.
Referenced by MediaWiki\RecentChanges\ChangesListStringOptionsFilterGroup\addOptions(), MediaWiki\RecentChanges\ChangesListFilterGroup\modifyChangesListQuery(), MediaWiki\RecentChanges\ChangesListStringOptionsFilterGroup\modifyQuery(), MediaWiki\RecentChanges\ChangesListFilterGroupContainer\popPendingConflicts(), and MediaWiki\RecentChanges\ChangesListFilterGroupContainer\registerGroup().
| MediaWiki\RecentChanges\ChangesListFilterGroup::getPriority | ( | ) |
Definition at line 300 of file ChangesListFilterGroup.php.
References MediaWiki\RecentChanges\ChangesListFilterGroup\$priority.
Referenced by MediaWiki\RecentChanges\ChangesListFilterGroupContainer\getJsData().
| MediaWiki\RecentChanges\ChangesListFilterGroup::getTitle | ( | ) |
Definition at line 286 of file ChangesListFilterGroup.php.
References MediaWiki\RecentChanges\ChangesListFilterGroup\$title.
| MediaWiki\RecentChanges\ChangesListFilterGroup::getType | ( | ) |
Definition at line 293 of file ChangesListFilterGroup.php.
References MediaWiki\RecentChanges\ChangesListFilterGroup\$type.
| MediaWiki\RecentChanges\ChangesListFilterGroup::modifyChangesListQuery | ( | ChangesListQuery | $query, |
| FormOptions | $opts, | ||
| $isStructuredFiltersEnabled ) |
Modifies the query to include the filter group.
| ChangesListQuery | $query | |
| FormOptions | $opts | |
| bool | $isStructuredFiltersEnabled |
Definition at line 457 of file ChangesListFilterGroup.php.
References MediaWiki\RecentChanges\ChangesListFilterGroup\$name, MediaWiki\RecentChanges\ChangesListQuery\ChangesListQuery\applyAction(), MediaWiki\RecentChanges\ChangesListFilterGroup\getFilters(), MediaWiki\RecentChanges\ChangesListFilterGroup\getName(), and MediaWiki\RecentChanges\ChangesListQuery\ChangesListQuery\highlight().
| MediaWiki\RecentChanges\ChangesListFilterGroup::modifyQuery | ( | IReadableDatabase | $dbr, |
| ChangesListSpecialPage | $specialPage, | ||
| & | $tables, | ||
| & | $fields, | ||
| & | $conds, | ||
| & | $query_options, | ||
| & | $join_conds, | ||
| FormOptions | $opts, | ||
| $isStructuredFiltersEnabled ) |
Modifies the query to include the filter group (legacy interface).
The modification is only done if the filter group is in effect. This means that one or more valid and allowed filters were selected.
| IReadableDatabase | $dbr | Database, for addQuotes, makeList, and similar |
| ChangesListSpecialPage | $specialPage | Current special page |
| array | &$tables | Array of tables; see IDatabase::select $table |
| array | &$fields | Array of fields; see IDatabase::select $vars |
| array | &$conds | Array of conditions; see IDatabase::select $conds |
| array | &$query_options | Array of query options; see IDatabase::select $options |
| array | &$join_conds | Array of join conditions; see IDatabase::select $join_conds |
| FormOptions | $opts | Wrapper for the current request options and their defaults |
| bool | $isStructuredFiltersEnabled | True if the Structured UI is currently enabled |
Reimplemented in MediaWiki\RecentChanges\ChangesListBooleanFilterGroup, and MediaWiki\RecentChanges\ChangesListStringOptionsFilterGroup.
Definition at line 444 of file ChangesListFilterGroup.php.
|
abstract |
Set the default for this filter group.
| bool[] | string | $defaultValue |
Reimplemented in MediaWiki\RecentChanges\ChangesListBooleanFilterGroup, and MediaWiki\RecentChanges\ChangesListStringOptionsFilterGroup.
| MediaWiki\RecentChanges\ChangesListFilterGroup::setUnidirectionalConflict | ( | $other, | |
| $globalDescription, | |||
| $contextDescription ) |
Marks that the given ChangesListFilterGroup or ChangesListFilter conflicts with this object.
Internal use ONLY.
| ChangesListFilterGroup | ChangesListFilter | $other | |
| string | $globalDescription | i18n key for top-level conflict message |
| string | $contextDescription | i18n key for conflict message in this direction (when in UI context of $this object) |
Definition at line 253 of file ChangesListFilterGroup.php.
Referenced by MediaWiki\RecentChanges\ChangesListFilterGroup\conflictsWith().
|
protected |
Array of associative arrays with conflict information.
See setUnidirectionalConflict
Definition at line 115 of file ChangesListFilterGroup.php.
|
protected |
Array of associative arrays with conflict information.
See setUnidirectionalConflict
Definition at line 107 of file ChangesListFilterGroup.php.
|
protected |
Associative array of filters, as ChangesListFilter objects, with filter name as key.
Definition at line 91 of file ChangesListFilterGroup.php.
Referenced by MediaWiki\RecentChanges\ChangesListFilterGroup\getFilters().
|
protected |
Whether this group is full coverage.
This means that checking every item in the group means no changes list (e.g. RecentChanges) entries are filtered out.
Definition at line 99 of file ChangesListFilterGroup.php.
Referenced by MediaWiki\RecentChanges\ChangesListFilterGroup\getJsData().
|
protected |
Name (internal identifier)
Definition at line 34 of file ChangesListFilterGroup.php.
Referenced by MediaWiki\RecentChanges\ChangesListFilterGroup\getFilter(), MediaWiki\RecentChanges\ChangesListFilterGroup\getJsData(), MediaWiki\RecentChanges\ChangesListFilterGroup\getName(), MediaWiki\RecentChanges\ChangesListFilterGroup\modifyChangesListQuery(), and MediaWiki\RecentChanges\ChangesListBooleanFilterGroup\setDefault().
|
protected |
Priority integer.
Higher values means higher up in the group list.
Definition at line 84 of file ChangesListFilterGroup.php.
Referenced by MediaWiki\RecentChanges\ChangesListFilterGroup\getJsData(), and MediaWiki\RecentChanges\ChangesListFilterGroup\getPriority().
|
protected |
i18n key for title
Definition at line 41 of file ChangesListFilterGroup.php.
Referenced by MediaWiki\RecentChanges\ChangesListFilterGroup\getJsData(), and MediaWiki\RecentChanges\ChangesListFilterGroup\getTitle().
|
protected |
Type, from a TYPE constant of a subclass.
Definition at line 76 of file ChangesListFilterGroup.php.
Referenced by MediaWiki\RecentChanges\ChangesListFilterGroup\getJsData(), and MediaWiki\RecentChanges\ChangesListFilterGroup\getType().
|
protected |
i18n key for body of What's This?
Definition at line 55 of file ChangesListFilterGroup.php.
Referenced by MediaWiki\RecentChanges\ChangesListFilterGroup\getJsData().
|
protected |
i18n key for header of What's This?
Definition at line 48 of file ChangesListFilterGroup.php.
Referenced by MediaWiki\RecentChanges\ChangesListFilterGroup\getJsData().
|
protected |
i18n key for What's This? link
Definition at line 69 of file ChangesListFilterGroup.php.
Referenced by MediaWiki\RecentChanges\ChangesListFilterGroup\getJsData().
|
protected |
URL of What's This? link.
Definition at line 62 of file ChangesListFilterGroup.php.
Referenced by MediaWiki\RecentChanges\ChangesListFilterGroup\getJsData().