|
| __construct (array $groupDefinition) |
|
| conflictsWith ($other, $globalKey, $forwardKey, $backwardKey) |
|
| setUnidirectionalConflict ($other, $globalDescription, $contextDescription) |
|
| getName () |
|
| getTitle () |
|
| getType () |
|
| getPriority () |
|
| getFilters () |
|
| getFilter ($name) |
|
| getJsData () |
|
| getConflictingGroups () |
|
| getConflictingFilters () |
|
| anySelected (FormOptions $opts) |
|
| modifyQuery (IDatabase $dbr, ChangesListSpecialPage $specialPage, &$tables, &$fields, &$conds, &$query_options, &$join_conds, FormOptions $opts, $isStructuredFiltersEnabled) |
|
| addOptions (FormOptions $opts, $allowDefaults, $isStructuredFiltersEnabled) |
|
|
const | DEFAULT_PRIORITY = -100 |
|
const | RESERVED_NAME_CHAR = '_' |
|
Represents a filter group (used on ChangesListSpecialPage and descendants)
- Since
- 1.29
ChangesListFilterGroup::__construct |
( |
array |
$groupDefinition | ) |
|
Create a new filter group with the specified configuration
- Parameters
-
array | $groupDefinition | Configuration of group
- $groupDefinition['name'] string Group name; use camelCase with no punctuation
- $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['type'] string A type constant from a subclass of this one
- $groupDefinition['priority'] int Priority integer. Higher value means higher up in the group list (optional, defaults to -100).
- $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.
- $groupDefinition['isFullCoverage'] bool Whether the group is full coverage; if true, this means that checking every item in the group means no changes list entries are filtered out.
- $groupDefinition['whatsThisHeader'] string i18n key for header of "What's
This" popup (optional).
- $groupDefinition['whatsThisBody'] string i18n key for body of "What's This" popup (optional).
- $groupDefinition['whatsThisUrl'] string URL for main link of "What's This" popup (optional).
- $groupDefinition['whatsThisLinkText'] string i18n key of text for main link of "What's This" popup (optional).
|
ChangesListFilterGroup::addOptions |
( |
FormOptions |
$opts, |
|
|
|
$allowDefaults, |
|
|
|
$isStructuredFiltersEnabled |
|
) |
| |
|
abstract |
All the options represented by this filter group to $opts
- Parameters
-
FormOptions | $opts | |
bool | $allowDefaults | |
bool | $isStructuredFiltersEnabled | |
ChangesListFilterGroup::anySelected |
( |
FormOptions |
$opts | ) |
|
Check if any filter in this group is selected
- Parameters
-
- Returns
- bool
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.
- Parameters
-
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) |
ChangesListFilterGroup::createFilter |
( |
array |
$filterDefinition | ) |
|
|
abstractprotected |
Creates a filter of the appropriate type for this group, from the definition
- Parameters
-
array | $filterDefinition | Filter definition |
- Returns
- ChangesListFilter Filter
ChangesListFilterGroup::getConflictingFilters |
( |
| ) |
|
ChangesListFilterGroup::getConflictingGroups |
( |
| ) |
|
ChangesListFilterGroup::getFilter |
( |
|
$name | ) |
|
Get filter by name
- Parameters
-
- Returns
- ChangesListFilter|null Specified filter, or null if it is not registered
ChangesListFilterGroup::getFilters |
( |
| ) |
|
ChangesListFilterGroup::getJsData |
( |
| ) |
|
Gets the JS data in the format required by the front-end of the structured UI
- Returns
- array|null Associative array, or null if there are no filters that display in the structured UI. messageKeys is a special top-level value, with the value being an array of the message keys to send to the client.
ChangesListFilterGroup::getName |
( |
| ) |
|
- Returns
- string Internal name
ChangesListFilterGroup::getPriority |
( |
| ) |
|
- Returns
- int Priority. Higher means higher in the group list
ChangesListFilterGroup::getTitle |
( |
| ) |
|
- Returns
- string i18n key for title
ChangesListFilterGroup::getType |
( |
| ) |
|
- Returns
- string Type (TYPE constant from a subclass)
Modifies the query to include the filter group.
The modification is only done if the filter group is in effect. This means that one or more valid and allowed filters were selected.
- Parameters
-
IDatabase | $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 |
ChangesListFilterGroup::setUnidirectionalConflict |
( |
|
$other, |
|
|
|
$globalDescription, |
|
|
|
$contextDescription |
|
) |
| |
array ChangesListFilterGroup::$conflictingFilters = [] |
|
protected |
Array of associative arrays with conflict information. See setUnidirectionalConflict
array ChangesListFilterGroup::$conflictingGroups = [] |
|
protected |
Array of associative arrays with conflict information. See setUnidirectionalConflict
array ChangesListFilterGroup::$filters |
|
protected |
bool ChangesListFilterGroup::$isFullCoverage |
|
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.
string ChangesListFilterGroup::$name |
|
protected |
Name (internal identifier)
string ChangesListFilterGroup::$priority |
|
protected |
Priority integer. Higher values means higher up in the group list.
string ChangesListFilterGroup::$title |
|
protected |
string ChangesListFilterGroup::$type |
|
protected |
Type, from a TYPE constant of a subclass
string null ChangesListFilterGroup::$whatsThisBody |
|
protected |
i18n key for body of What's This?
string null ChangesListFilterGroup::$whatsThisHeader |
|
protected |
i18n key for header of What's This?
string null ChangesListFilterGroup::$whatsThisLinkText |
|
protected |
i18n key for What's This? link
string null ChangesListFilterGroup::$whatsThisUrl |
|
protected |
The documentation for this class was generated from the following file: