MediaWiki REL1_28
Go to the documentation of this file.
33 function __construct( $name = 'Mostimages' ) {
34 parent::__construct( $name );
35 }
37 function isExpensive() {
38 return true;
39 }
41 function isSyndicated() {
42 return false;
43 }
45 function getQueryInfo() {
46 return [
47 'tables' => [ 'imagelinks' ],
48 'fields' => [
49 'namespace' => NS_FILE,
50 'title' => 'il_to',
51 'value' => 'COUNT(*)'
52 ],
53 'options' => [
54 'GROUP BY' => 'il_to',
55 'HAVING' => 'COUNT(*) > 1'
56 ]
57 ];
58 }
60 function getCellHtml( $row ) {
61 return $this->msg( 'nimagelinks' )->numParams( $row->value )->escaped() . '<br />';
62 }
64 protected function getGroupName() {
65 return 'highuse';
66 }
Variant of QueryPage which uses a gallery to output results, thus suited for reports generating image...
A special page that lists most used images.
Is this query expensive (for some definition of expensive)? Then we don't let it run in miser mode.
__construct( $name='Mostimages')
Sometime we don't want to build rss / atom feeds.
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
getCellHtml( $row)
Get additional HTML to be shown in a results' cell.
Subclasses return an SQL query here, formatted as an array with the following keys: tables => Table(s...
Wrapper around wfMessage that sets the current context.
const NS_FILE
Definition Defines.php:62
Allows to change the fields on the form that will be generated $name
Definition hooks.txt:304
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