MediaWiki  REL1_31
Go to the documentation of this file.
1 <?php
6  public function createFilter( array $filterDefinition ) {
7  return new MockChangesListFilter( $filterDefinition );
8  }
10  public function registerFilter( MockChangesListFilter $filter ) {
11  $this->filters[$filter->getName()] = $filter;
12  }
14  public function modifyQuery( IDatabase $dbr, ChangesListSpecialPage $specialPage,
15  &$tables, &$fields, &$conds, &$query_options, &$join_conds, FormOptions $opts,
16  $isStructuredFiltersEnabled ) {
17  }
19  public function addOptions( FormOptions $opts, $allowDefaults, $isStructuredFiltersEnabled ) {
20  }
21 }
Apache License January AND DISTRIBUTION Definitions License shall mean the terms and conditions for use
Definition: APACHE-LICENSE-2.0.txt:10
the array() calling protocol came about after MediaWiki 1.4rc1.
Special page which uses a ChangesList to show query results.
Definition: ChangesListSpecialPage.php:35
registerFilter(MockChangesListFilter $filter)
Definition: MockChangesListFilterGroup.php:10
Definition: ChangesListFilter.php:268
Represents a filter group (used on ChangesListSpecialPage and descendants)
Definition: ChangesListFilterGroup.php:36
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
Definition: injection.txt:37
Basic database interface for live and lazy-loaded relation database handles.
Definition: IDatabase.php:38
Definition: testCompression.php:50
createFilter(array $filterDefinition)
Creates a filter of the appropriate type for this group, from the definition.
Definition: MockChangesListFilterGroup.php:6
addOptions(FormOptions $opts, $allowDefaults, $isStructuredFiltersEnabled)
All the options represented by this filter group to $opts.
Definition: MockChangesListFilterGroup.php:19
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
Definition: hooks.txt:1015
Definition: MockChangesListFilterGroup.php:5
Helper class to keep track of options when mixing links and form elements.
Definition: FormOptions.php:35
Definition: MockChangesListFilter.php:3
modifyQuery(IDatabase $dbr, ChangesListSpecialPage $specialPage, &$tables, &$fields, &$conds, &$query_options, &$join_conds, FormOptions $opts, $isStructuredFiltersEnabled)
Modifies the query to include the filter group.
Definition: MockChangesListFilterGroup.php:14