11use MediaWiki\Cache\LinkBatchFactory;
37 LinkBatchFactory $linkBatchFactory
39 parent::__construct(
'Mostcategories' );
40 $this->namespaceInfo = $namespaceInfo;
58 'tables' => [
'categorylinks',
'page' ],
60 'namespace' =>
'page_namespace',
61 'title' =>
'page_title',
65 'page_namespace' => $this->namespaceInfo->getContentNamespaces()
68 'HAVING' =>
'COUNT(*) > 1',
69 'GROUP BY' => [
'page_namespace',
'page_title' ]
83 CategoryLinksTable::VIRTUAL_DOMAIN,
102 $title = Title::makeTitleSafe( $result->namespace, $result->title );
106 [
'class' =>
'mw-invalidtitle' ],
107 Linker::getInvalidTitleDescription(
117 $link = $linkRenderer->makeLink( $title );
119 $link = $linkRenderer->makeKnownLink( $title );
122 $count = $this->
msg(
'ncategories' )->numParams( $result->value )->escaped();
124 return $this->
getLanguage()->specialList( $link, $count );
137class_alias( SpecialMostCategories::class,
'SpecialMostCategories' );
This is a class for doing query pages; since they're almost all the same, we factor out some of the f...
setDatabaseProvider(IConnectionProvider $databaseProvider)
isCached()
Whether or not the output of the page in question is retrieved from the database cache.
executeLBFromResultWrapper(IResultWrapper $res, $ns=null)
Creates a new LinkBatch object, adds all pages from the passed result wrapper (MUST include title and...
setLinkBatchFactory(LinkBatchFactory $linkBatchFactory)
getContext()
Gets the context this SpecialPage is executed in.
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
getLanguage()
Shortcut to get user's language.