MediaWiki master
ChangesListStringOptionsFilter.php
Go to the documentation of this file.
1<?php
2
4
16 public function displaysOnUnstructuredUi() {
17 return false;
18 }
19
23 public function isSelected( FormOptions $opts ) {
24 $option = $opts[ $this->getGroup()->getName() ];
25 if ( $option === ChangesListStringOptionsFilterGroup::ALL ) {
26 return true;
27 }
28
29 $values = explode( ChangesListStringOptionsFilterGroup::SEPARATOR, $option );
30 return in_array( $this->getName(), $values );
31 }
32}
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.