11use MediaWiki\Cache\LinkBatchFactory;
14use MediaWiki\Languages\LanguageConverterFactory;
37 LinkBatchFactory $linkBatchFactory,
38 LanguageConverterFactory $languageConverterFactory
40 parent::__construct(
'Mostlinkedcategories' );
43 $this->languageConverter = $languageConverterFactory->getLanguageConverter( $this->
getContentLanguage() );
55 'tables' => [
'category' ],
56 'fields' => [
'title' =>
'cat_title',
58 'value' =>
'cat_pages' ],
59 'conds' => [ $dbr->expr(
'cat_pages',
'>', 0 ) ],
84 $nt = Title::makeTitleSafe(
NS_CATEGORY, $result->title );
88 [
'class' =>
'mw-invalidtitle' ],
89 Linker::getInvalidTitleDescription(
96 $text = $this->languageConverter->convertHtml( $nt->getText() );
99 $nlinks = $this->
msg(
'nmembers' )->numParams( $result->value )->escaped();
101 return $this->
getLanguage()->specialList( $plink, $nlinks );
113class_alias( SpecialMostLinkedCategories::class,
'SpecialMostLinkedCategories' );
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)
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.
getContentLanguage()
Shortcut to get content language.
getLanguage()
Shortcut to get user's language.