MediaWiki
master
ChangesListStringOptionsFilter.php
Go to the documentation of this file.
1
<?php
2
3
use
MediaWiki\Html\FormOptions
;
4
13
class
ChangesListStringOptionsFilter
extends
ChangesListFilter
{
17
public
function
displaysOnUnstructuredUi
() {
18
return
false
;
19
}
20
24
public
function
isSelected
(
FormOptions
$opts ) {
25
$option = $opts[ $this->
getGroup
()->getName() ];
26
if
( $option === ChangesListStringOptionsFilterGroup::ALL ) {
27
return
true
;
28
}
29
30
$values = explode( ChangesListStringOptionsFilterGroup::SEPARATOR, $option );
31
return
in_array( $this->
getName
(), $values );
32
}
33
}
ChangesListFilter
Represents a filter (used on ChangesListSpecialPage and descendants)
Definition
ChangesListFilter.php:31
ChangesListFilter\getGroup
getGroup()
Definition
ChangesListFilter.php:277
ChangesListFilter\getName
getName()
Definition
ChangesListFilter.php:270
ChangesListStringOptionsFilter
An individual filter in a ChangesListStringOptionsFilterGroup.
Definition
ChangesListStringOptionsFilter.php:13
ChangesListStringOptionsFilter\displaysOnUnstructuredUi
displaysOnUnstructuredUi()
Checks whether the filter should display on the unstructured UI.bool Whether to display
Definition
ChangesListStringOptionsFilter.php:17
ChangesListStringOptionsFilter\isSelected
isSelected(FormOptions $opts)
Checks whether this filter is selected in the provided options.bool
Definition
ChangesListStringOptionsFilter.php:24
MediaWiki\Html\FormOptions
Helper class to keep track of options when mixing links and form elements.
Definition
FormOptions.php:42
includes
recentchanges
ChangesListStringOptionsFilter.php
Generated on Sun Sep 15 2024 07:24:09 for MediaWiki by
1.10.0