Merge "Improve "selfmove" message's wording"
[lhc/web/wiklou.git] / includes / changes / ChangesListStringOptionsFilter.php
1 <?php
2
3 /**
4 * An individual filter in a ChangesListStringOptionsFilterGroup.
5 *
6 * This filter type will only be displayed on the structured UI currently.
7 *
8 * @since 1.29
9 */
10 class ChangesListStringOptionsFilter extends ChangesListFilter {
11 /**
12 * @inheritDoc
13 */
14 public function displaysOnUnstructuredUi() {
15 return false;
16 }
17
18 /**
19 * @inheritDoc
20 */
21 public function isSelected( FormOptions $opts ) {
22 $option = $opts[ $this->getGroup()->getName() ];
23 if ( $option === ChangesListStringOptionsFilterGroup::ALL ) {
24 return true;
25 }
26
27 $values = explode( ChangesListStringOptionsFilterGroup::SEPARATOR, $option );
28 return in_array( $this->getName(), $values );
29 }
30 }