MediaWiki master
ChangesListStringOptionsFilter.php
Go to the documentation of this file.
1<?php
2
4
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}
Represents a filter (used on ChangesListSpecialPage and descendants)
An individual filter in a ChangesListStringOptionsFilterGroup.
displaysOnUnstructuredUi()
Checks whether the filter should display on the unstructured UI.bool Whether to display
isSelected(FormOptions $opts)
Checks whether this filter is selected in the provided options.bool
Helper class to keep track of options when mixing links and form elements.