MediaWiki REL1_37
SpecialListUsers.php
Go to the documentation of this file.
1<?php
31
36
39
42
45
51 public function __construct(
55 ) {
56 parent::__construct( 'Listusers' );
57 $this->linkBatchFactory = $linkBatchFactory;
58 $this->loadBalancer = $loadBalancer;
59 $this->userGroupManager = $userGroupManager;
60 }
61
65 public function execute( $par ) {
66 $this->setHeaders();
67 $this->outputHeader();
68
69 $up = new UsersPager(
70 $this->getContext(),
71 $par,
72 $this->including(),
73 $this->linkBatchFactory,
74 $this->getHookContainer(),
75 $this->loadBalancer,
76 $this->userGroupManager
77 );
78
79 # getBody() first to check, if empty
80 $usersbody = $up->getBody();
81
82 $s = '';
83 if ( !$this->including() ) {
84 $s = $up->getPageHeader();
85 }
86
87 if ( $usersbody ) {
88 $s .= $up->getNavigationBar();
89 $s .= Html::rawElement( 'ul', [], $usersbody );
90 $s .= $up->getNavigationBar();
91 } else {
92 $s .= $this->msg( 'listusers-noresult' )->parseAsBlock();
93 }
94
95 $out = $this->getOutput();
96 $out->addHTML( $s );
97 $out->addModuleStyles( 'mediawiki.interface.helpers.styles' );
98 }
99
105 public function getSubpagesForPrefixSearch() {
106 return $this->userGroupManager->listAllGroups();
107 }
108
109 protected function getGroupName() {
110 return 'users';
111 }
112}
Shortcut to construct an includable special page.
LinkBatchFactory $linkBatchFactory
ILoadBalancer $loadBalancer
UserGroupManager $userGroupManager
__construct(LinkBatchFactory $linkBatchFactory, ILoadBalancer $loadBalancer, UserGroupManager $userGroupManager)
getSubpagesForPrefixSearch()
Return an array of subpages that this special page will accept.
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages Per default the message key is the canonical name o...
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
getOutput()
Get the OutputPage being used for this instance.
getContext()
Gets the context this SpecialPage is executed in.
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
including( $x=null)
Whether the special page is being evaluated via transclusion.
This class is used to get a list of user.
Database cluster connection, tracking, load balancing, and transaction manager interface.
foreach( $mmfl['setupFiles'] as $fileName) if($queue) if(empty( $mmfl['quiet'])) $s