MediaWiki REL1_30
|
Represents a filter group (used on ChangesListSpecialPage and descendants) More...
Public Member Functions | |
__construct (array $groupDefinition) | |
Create a new filter group with the specified configuration. | |
anySelected (FormOptions $opts) | |
Check if any filter in this group is selected. | |
conflictsWith ( $other, $globalKey, $forwardKey, $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 () | |
isPerGroupRequestParameter () | |
Check whether the URL parameter is for the group, or for individual filters. | |
setUnidirectionalConflict ( $other, $globalDescription, $contextDescription) | |
Marks that the given ChangesListFilterGroup or ChangesListFilter conflicts with this object. | |
Public Attributes | |
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. | |
Protected Attributes | |
$conflictingFilters = [] | |
Array of associative arrays with conflict information. | |
$conflictingGroups = [] | |
Array of associative arrays with conflict information. | |
$filters | |
Associative array of filters, as ChangesListFilter objects, with filter name as key. | |
$isFullCoverage | |
Whether this group is full coverage. | |
$name | |
Name (internal identifier) | |
$priority | |
Priority integer. | |
$title | |
i18n key for title | |
$type | |
Type, from a TYPE constant of a subclass. | |
$whatsThisBody | |
i18n key for body of What's This? | |
$whatsThisHeader | |
i18n key for header of What's This? | |
$whatsThisLinkText | |
i18n key for What's This? link | |
$whatsThisUrl | |
URL of What's This? link. | |
Represents a filter group (used on ChangesListSpecialPage and descendants)
Definition at line 35 of file ChangesListFilterGroup.php.
ChangesListFilterGroup::__construct | ( | array | $groupDefinition | ) |
Create a new filter group with the specified configuration.
array | $groupDefinition | Configuration of group
|
Reimplemented in ChangesListBooleanFilterGroup, and ChangesListStringOptionsFilterGroup.
Definition at line 154 of file ChangesListFilterGroup.php.
References as, createFilter(), DEFAULT_PRIORITY, name, title, and type.
ChangesListFilterGroup::anySelected | ( | FormOptions | $opts | ) |
Check if any filter in this group is selected.
FormOptions | $opts |
Definition at line 444 of file ChangesListFilterGroup.php.
References getFilters(), ChangesListFilter\isSelected(), and use.
ChangesListFilterGroup::conflictsWith | ( | $other, | |
$globalKey, | |||
$forwardKey, | |||
$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 | Other ChangesListFilterGroup or ChangesListFilter |
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 232 of file ChangesListFilterGroup.php.
References setUnidirectionalConflict().
|
abstractprotected |
Creates a filter of the appropriate type for this group, from the definition.
array | $filterDefinition | Filter definition |
Reimplemented in ChangesListBooleanFilterGroup, ChangesListStringOptionsFilterGroup, and MockChangesListFilterGroup.
Referenced by __construct().
ChangesListFilterGroup::getConflictingFilters | ( | ) |
Get filters conflicting with this filter group.
Definition at line 429 of file ChangesListFilterGroup.php.
References $conflictingFilters.
ChangesListFilterGroup::getConflictingGroups | ( | ) |
Get groups conflicting with this filter group.
Definition at line 415 of file ChangesListFilterGroup.php.
References $conflictingGroups.
ChangesListFilterGroup::getFilter | ( | $name | ) |
Get filter by name.
string | $name | Filter name |
Definition at line 325 of file ChangesListFilterGroup.php.
References $name.
ChangesListFilterGroup::getFilters | ( | ) |
Definition at line 315 of file ChangesListFilterGroup.php.
References $filters.
Referenced by anySelected().
ChangesListFilterGroup::getJsData | ( | ) |
Gets the JS data in the format required by the front-end of the structured UI.
Reimplemented in ChangesListStringOptionsFilterGroup.
Definition at line 344 of file ChangesListFilterGroup.php.
References $isFullCoverage, $name, $output, $priority, $title, $type, $whatsThisBody, $whatsThisHeader, $whatsThisLinkText, $whatsThisUrl, and as.
ChangesListFilterGroup::getName | ( | ) |
Definition at line 286 of file ChangesListFilterGroup.php.
References $name.
Referenced by ChangesListSpecialPage\registerFilterGroup().
ChangesListFilterGroup::getPriority | ( | ) |
Definition at line 307 of file ChangesListFilterGroup.php.
References $priority.
ChangesListFilterGroup::getTitle | ( | ) |
Definition at line 293 of file ChangesListFilterGroup.php.
References $title.
ChangesListFilterGroup::getType | ( | ) |
Definition at line 300 of file ChangesListFilterGroup.php.
References $type.
|
abstract |
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.
Reimplemented in ChangesListBooleanFilterGroup, ChangesListStringOptionsFilterGroup, and MockChangesListFilterGroup.
ChangesListFilterGroup::setUnidirectionalConflict | ( | $other, | |
$globalDescription, | |||
$contextDescription | |||
) |
Marks that the given ChangesListFilterGroup or ChangesListFilter conflicts with this object.
Internal use ONLY.
ChangesListFilterGroup | ChangesListFilter | $other | Other ChangesListFilterGroup or ChangesListFilter |
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 262 of file ChangesListFilterGroup.php.
Referenced by conflictsWith().
|
protected |
Array of associative arrays with conflict information.
See setUnidirectionalConflict
Definition at line 122 of file ChangesListFilterGroup.php.
Referenced by getConflictingFilters().
|
protected |
Array of associative arrays with conflict information.
See setUnidirectionalConflict
Definition at line 114 of file ChangesListFilterGroup.php.
Referenced by getConflictingGroups().
|
protected |
Associative array of filters, as ChangesListFilter objects, with filter name as key.
Definition at line 98 of file ChangesListFilterGroup.php.
Referenced by 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 106 of file ChangesListFilterGroup.php.
Referenced by getJsData().
|
protected |
Name (internal identifier)
Definition at line 41 of file ChangesListFilterGroup.php.
Referenced by getFilter(), getJsData(), and getName().
|
protected |
Priority integer.
Higher values means higher up in the group list.
Definition at line 91 of file ChangesListFilterGroup.php.
Referenced by getJsData(), and getPriority().
|
protected |
i18n key for title
Definition at line 48 of file ChangesListFilterGroup.php.
Referenced by getJsData(), and getTitle().
|
protected |
Type, from a TYPE constant of a subclass.
Definition at line 83 of file ChangesListFilterGroup.php.
Referenced by getJsData(), and getType().
|
protected |
i18n key for body of What's This?
Definition at line 62 of file ChangesListFilterGroup.php.
Referenced by getJsData().
|
protected |
i18n key for header of What's This?
Definition at line 55 of file ChangesListFilterGroup.php.
Referenced by getJsData().
|
protected |
i18n key for What's This? link
Definition at line 76 of file ChangesListFilterGroup.php.
Referenced by getJsData().
|
protected |
URL of What's This? link.
Definition at line 69 of file ChangesListFilterGroup.php.
Referenced by getJsData().
const ChangesListFilterGroup::DEFAULT_PRIORITY = -100 |
Definition at line 124 of file ChangesListFilterGroup.php.
Referenced by __construct().
const ChangesListFilterGroup::RESERVED_NAME_CHAR = '_' |
Definition at line 126 of file ChangesListFilterGroup.php.