Go to the documentation of this file.
115 parent::__construct( $filterDefinition );
117 if ( isset( $filterDefinition[
'showHide'] ) ) {
118 $this->showHide = $filterDefinition[
'showHide'];
121 if ( isset( $filterDefinition[
'isReplacedInStructuredUi'] ) ) {
122 $this->isReplacedInStructuredUi = $filterDefinition[
'isReplacedInStructuredUi'];
124 $this->isReplacedInStructuredUi =
false;
127 if ( isset( $filterDefinition[
'default'] ) ) {
128 $this->defaultValue = $filterDefinition[
'default'];
133 if ( isset( $filterDefinition[
'queryCallable'] ) ) {
134 $this->queryCallable = $filterDefinition[
'queryCallable'];
145 return $this->isReplacedInStructuredUi && $structuredUI ?
177 return $this->isReplacedInStructuredUi ||
178 parent::isFeatureAvailableOnStructuredUi();
194 &
$tables, &$fields, &$conds, &$query_options, &$join_conds ) {
196 if ( $this->queryCallable ===
null ) {
200 call_user_func_array(
201 $this->queryCallable,
203 get_class( $specialPage ),
230 return !$opts[ $this->
getName() ] &&
231 array_filter( $this->
getSiblings(),
function ( $sibling )
use ( $opts ) {
232 return $opts[ $sibling->getName() ];
processing should stop and the error should be shown to the user * false
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
getDefault( $structuredUI=false)
Get the default value.
isSelected(FormOptions $opts)
Checks whether this filter is selected in the provided options.bool
as see the revision history and available at free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to use
Special page which uses a ChangesList to show query results.
An individual filter in a boolean group.
isFeatureAvailableOnStructuredUi()
Checks whether an equivalent feature for this filter is available on the structured UI....
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
__construct( $filterDefinition)
Create a new filter with the specified configuration.
getSiblings()
Get filters in the same group.
setDefault( $defaultValue)
Sets default.
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 and Watchlist you will want to construct new ChangesListBooleanFilter or ChangesListStringOptionsFilter objects When constructing you specify which group they belong to You can reuse existing or create your you must register them with $special registerFilterGroup removed from all revisions and log entries to which it was applied This gives extensions a chance to take it off their books as the deletion has already been partly carried out by this point or something similar the user will be unable to create the tag set and then return false from the hook function Ensure you consume the ChangeTagAfterDelete hook to carry out custom deletion actions as context called by AbstractContent::getParserOutput May be used to override the normal model specific rendering of page content as context as context the output can only depend on parameters provided to this hook not on global state indicating whether full HTML should be generated If generation of HTML may be but other information should still be present in the ParserOutput object & $output
getContext()
Gets the context this SpecialPage is executed in.
modifyQuery(IDatabase $dbr, ChangesListSpecialPage $specialPage, &$tables, &$fields, &$conds, &$query_options, &$join_conds)
Modifies the query to include the filter.
$queryCallable
Callable used to do the actual query modification; see constructor.
displaysOnUnstructuredUi()
Checks whether the filter should display on the unstructured UI.bool Whether to display
$isReplacedInStructuredUi
Whether there is a feature designed to replace this filter available on the structured UI.
Represents a filter (used on ChangesListSpecialPage and descendants)
$showHide
Main unstructured UI i18n key.
getJsData()
Gets the JS data required by the front-end of the structured UI.array Associative array Data required...