116 parent::__construct( $filterDefinition );
118 if ( isset( $filterDefinition[
'showHide'] ) ) {
119 $this->showHide = $filterDefinition[
'showHide'];
122 if ( isset( $filterDefinition[
'isReplacedInStructuredUi'] ) ) {
123 $this->isReplacedInStructuredUi = $filterDefinition[
'isReplacedInStructuredUi'];
125 $this->isReplacedInStructuredUi =
false;
128 if ( isset( $filterDefinition[
'default'] ) ) {
129 $this->
setDefault( $filterDefinition[
'default'] );
134 if ( isset( $filterDefinition[
'queryCallable'] ) ) {
135 $this->queryCallable = $filterDefinition[
'queryCallable'];
138 if ( isset( $filterDefinition[
'activeValue'] ) ) {
139 $this->activeValue = $filterDefinition[
'activeValue'];
141 $this->activeValue =
true;
152 return $this->isReplacedInStructuredUi && $structuredUI ?
153 !$this->activeValue :
186 return $this->isReplacedInStructuredUi ||
187 parent::isFeatureAvailableOnStructuredUi();
203 &
$tables, &$fields, &$conds, &$query_options, &$join_conds
205 if ( $this->queryCallable ===
null ) {
209 call_user_func_array(
210 $this->queryCallable,
212 get_class( $specialPage ),
239 return !$opts[ $this->
getName() ] &&
243 return $opts[ $sibling->getName() ];
254 if ( $this->isReplacedInStructuredUi && $isStructuredUI ) {
Represents a hide-based boolean filter (used on ChangesListSpecialPage and descendants)
displaysOnUnstructuredUi()
@inheritDoc
isSelected(FormOptions $opts)
@inheritDoc
isActive(FormOptions $opts, $isStructuredUI)
__construct( $filterDefinition)
Create a new filter with the specified configuration.
modifyQuery(IDatabase $dbr, ChangesListSpecialPage $specialPage, &$tables, &$fields, &$conds, &$query_options, &$join_conds)
Modifies the query to include the filter.
setDefault( $defaultValue)
Sets default.
$isReplacedInStructuredUi
Whether there is a feature designed to replace this filter available on the structured UI.
$showHide
Main unstructured UI i18n key.
isFeatureAvailableOnStructuredUi()
@inheritDoc
$activeValue
Value that defined when this filter is considered active.
getDefault( $structuredUI=false)
Get the default value.
$queryCallable
Callable used to do the actual query modification; see constructor.
Represents a filter (used on ChangesListSpecialPage and descendants)
getSiblings()
Get filters in the same group.
Special page which uses a ChangesList to show query results.
getContext()
Gets the context this SpecialPage is executed in.
static configuration should be added through ResourceLoaderGetConfigVars instead can be used to get the real title after the basic globals have been set but before ordinary actions take place $output
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist Do not use this to implement individual filters if they are compatible with the ChangesListFilter and ChangesListFilterGroup structure use sub classes of those in conjunction with the ChangesListSpecialPageStructuredFilters hook This hook can be used to implement filters that do not implement that or custom behavior that is not an individual filter e g Watchlist & $tables