10use MediaWiki\Cache\LinkBatchFactory;
25 private LinkBatchFactory $linkBatchFactory;
29 LinkBatchFactory $linkBatchFactory,
36 parent::__construct( $context, $linkRenderer );
37 $this->linkBatchFactory = $linkBatchFactory;
38 $from = str_replace(
' ',
'_', $from );
49 'tables' => [
'category' ],
50 'fields' => [
'cat_title',
'cat_pages' ],
51 'options' => [
'USE INDEX' =>
'cat_title' ],
62 parent::getDefaultQuery();
63 unset( $this->mDefaultQuery[
'from'] );
73 $batch = $this->linkBatchFactory->newLinkBatch();
75 $this->mResult->rewind();
77 foreach ( $this->mResult as $row ) {
81 $this->mResult->rewind();
83 return parent::getBody();
89 $text = $title->getText();
92 $count = $this->
msg(
'nmembers' )->numParams( $result->cat_pages )->escaped();
93 return Html::rawElement(
'li', [], $this->
getLanguage()->specialList( $link, $count ) ) .
"\n";
103 'label-message' =>
'categoriesfrom',
111 $htmlForm = HTMLForm::factory(
'ooui', $formDescriptor, $this->
getContext() )
112 ->setSubmitTextMsg(
'categories-submit' )
113 ->setWrapperLegendMsg(
'categories' )
114 ->setMethod(
'get' );
115 return $htmlForm->prepareForm()->getHTML(
false );
124class_alias( CategoryPager::class,
'CategoryPager' );
127class_alias( CategoryPager::class,
'MediaWiki\\Pager\\CategoryPager' );
msg( $key,... $params)
Get a Message object with context set Parameters are the same as wfMessage()
getContext()
Get the base IContextSource object.
Interface for objects which can provide a MediaWiki context on request.