MediaWiki REL1_34
SpecialListUsers.php
Go to the documentation of this file.
1<?php
32
33 public function __construct() {
34 parent::__construct( 'Listusers' );
35 }
36
40 public function execute( $par ) {
41 $this->setHeaders();
42 $this->outputHeader();
43
44 $up = new UsersPager( $this->getContext(), $par, $this->including() );
45
46 # getBody() first to check, if empty
47 $usersbody = $up->getBody();
48
49 $s = '';
50 if ( !$this->including() ) {
51 $s = $up->getPageHeader();
52 }
53
54 if ( $usersbody ) {
55 $s .= $up->getNavigationBar();
56 $s .= Html::rawElement( 'ul', [], $usersbody );
57 $s .= $up->getNavigationBar();
58 } else {
59 $s .= $this->msg( 'listusers-noresult' )->parseAsBlock();
60 }
61
62 $out = $this->getOutput();
63 $out->addHTML( $s );
64 $out->addModuleStyles( 'mediawiki.interface.helpers.styles' );
65 }
66
72 public function getSubpagesForPrefixSearch() {
73 return User::getAllGroups();
74 }
75
76 protected function getGroupName() {
77 return 'users';
78 }
79}
Shortcut to construct an includable special page.
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.
static getAllGroups()
Return the set of defined explicit groups.
Definition User.php:4914
This class is used to get a list of user.