* @since 1.29
*/
class ChangesListBooleanFilter extends ChangesListFilter {
- // This can sometimes be different on Special:RecentChanges
- // and Special:Watchlist, due to the double-legacy hooks
- // (SpecialRecentChangesFilters and SpecialWatchlistFilters)
-
- // but there will be separate sets of ChangesListFilterGroup and ChangesListFilter instances
- // for those pages (it should work even if they're both loaded
- // at once, but that can't happen).
/**
* Main unstructured UI i18n key
*
$this->showHide = $filterDefinition['showHide'];
}
- if ( isset( $filterDefinition['isReplacedInStructuredUi'] ) ) {
- $this->isReplacedInStructuredUi = $filterDefinition['isReplacedInStructuredUi'];
- } else {
- $this->isReplacedInStructuredUi = false;
- }
+ $this->isReplacedInStructuredUi = $filterDefinition['isReplacedInStructuredUi'] ?? false;
if ( isset( $filterDefinition['default'] ) ) {
$this->setDefault( $filterDefinition['default'] );
$this->queryCallable = $filterDefinition['queryCallable'];
}
- if ( isset( $filterDefinition['activeValue'] ) ) {
- $this->activeValue = $filterDefinition['activeValue'];
- } else {
- $this->activeValue = true;
- }
+ $this->activeValue = $filterDefinition['activeValue'] ?? true;
}
/**