|
const | RESERVED_NAME_CHAR = '_' |
|
Represents a filter (used on ChangesListSpecialPage and descendants)
- Since
- 1.29
ChangesListFilter::__construct |
( |
array |
$filterDefinition | ) |
|
Creates a new filter with the specified configuration, and registers it to the specified group.
It infers which UI (it can be either or both) to display the filter on based on which messages are provided.
If 'label' is provided, it will be displayed on the structured UI. Thus, 'label', 'description', and sub-class parameters are optional depending on which UI it's for.
- Parameters
-
array | $filterDefinition | ChangesListFilter definition
- $filterDefinition['name'] string Name of filter; use lowercase with no punctuation
- $filterDefinition['cssClassSuffix'] string CSS class suffix, used to mark that a particular row belongs to this filter (when a row is included by the filter) (optional)
- $filterDefinition['isRowApplicableCallable'] Callable taking two parameters, the IContextSource, and the RecentChange object for the row, and returning true if the row is attributed to this filter. The above CSS class will then be automatically added (optional, required if cssClassSuffix is used).
- $filterDefinition['group'] ChangesListFilterGroup Group. Filter group this belongs to.
- $filterDefinition['label'] string i18n key of label for structured UI.
- $filterDefinition['description'] string i18n key of description for structured UI.
- $filterDefinition['priority'] int Priority integer. Higher value means higher up in the group's filter list.
|
Add CSS class if needed
- Parameters
-
IContextSource | $ctx | Context source |
RecentChange | $rc | Recent changes object |
array | &$classes | Non-associative array of CSS class names; appended to if needed |
ChangesListFilter::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) |
ChangesListFilter::displaysOnStructuredUi |
( |
| ) |
|
Checks whether the filter should display on the structured UI This refers to the exact filter. See also isFeatureAvailableOnStructuredUi.
- Returns
- bool Whether to display
ChangesListFilter::displaysOnUnstructuredUi |
( |
| ) |
|
|
abstract |
Checks whether the filter should display on the unstructured UI
- Returns
- bool Whether to display
ChangesListFilter::getConflictingFilters |
( |
| ) |
|
ChangesListFilter::getConflictingGroups |
( |
| ) |
|
ChangesListFilter::getCssClass |
( |
| ) |
|
|
protected |
Gets the CSS class
- Returns
- string|null CSS class, or null if not defined
ChangesListFilter::getDescription |
( |
| ) |
|
- Returns
- string i18n key of description for structured UI
ChangesListFilter::getGroup |
( |
| ) |
|
ChangesListFilter::getJsData |
( |
| ) |
|
Gets the JS data required by the front-end of the structured UI
- Returns
- array Associative array Data required by the front-end. messageKeys is a special top-level value, with the value being an array of the message keys to send to the client.
ChangesListFilter::getLabel |
( |
| ) |
|
- Returns
- string i18n key of label for structured UI
ChangesListFilter::getName |
( |
| ) |
|
- Returns
- string Name, e.g. hideanons
ChangesListFilter::getPriority |
( |
| ) |
|
- Returns
- int Priority. Higher value means higher up in the group list
ChangesListFilter::getSiblings |
( |
| ) |
|
|
protected |
ChangesListFilter::isFeatureAvailableOnStructuredUi |
( |
| ) |
|
Checks whether an equivalent feature for this filter is available on the structured UI.
This can either be the exact filter, or a new filter that replaces it.
- Returns
- bool
Checks whether this filter is selected in the provided options
- Parameters
-
- Returns
- bool
Marks that the current instance is (also) a superset of the filter passed in. This can be called more than once.
This means that anything in the results for the other filter is also in the results for this one.
- Parameters
-
ChangesListFilter::setDefaultHighlightColor |
( |
|
$defaultHighlightColor | ) |
|
- Parameters
-
string | $defaultHighlightColor | |
ChangesListFilter::setUnidirectionalConflict |
( |
|
$other, |
|
|
|
$globalDescription, |
|
|
|
$contextDescription |
|
) |
| |
array ChangesListFilter::$conflictingFilters = [] |
|
protected |
Array of associative arrays with conflict information. See setUnidirectionalConflict
array ChangesListFilter::$conflictingGroups = [] |
|
protected |
Array of associative arrays with conflict information. See setUnidirectionalConflict
string null ChangesListFilter::$cssClassSuffix |
|
protected |
CSS class suffix used for attribution, e.g. 'bot'.
In this example, if bot actions are included in the result set, this CSS class will then be included in all bot-flagged actions.
string ChangesListFilter::$description |
|
protected |
i18n key of description for structured UI
callable ChangesListFilter::$isRowApplicableCallable |
|
protected |
Callable that returns true if and only if a row is attributed to this filter
string ChangesListFilter::$label |
|
protected |
i18n key of label for structured UI
string ChangesListFilter::$name |
|
protected |
string ChangesListFilter::$priority |
|
protected |
Priority integer. Higher value means higher up in the group's filter list.
array ChangesListFilter::$subsetFilters = [] |
|
protected |
Array of associative arrays with subset information
The documentation for this class was generated from the following file:
- /home/hwfunc/workspace/leonid/BlueSpiceDoc-composer/mediawiki-master/includes/changes/ChangesListFilter.php