MediaWiki  1.30.0
SpecialListusers.php
Go to the documentation of this file.
1 <?php
32 
33  public function __construct() {
34  parent::__construct( 'Listusers' );
35  }
36 
42  public function execute( $par ) {
43  $this->setHeaders();
44  $this->outputHeader();
45 
46  $up = new UsersPager( $this->getContext(), $par, $this->including() );
47 
48  # getBody() first to check, if empty
49  $usersbody = $up->getBody();
50 
51  $s = '';
52  if ( !$this->including() ) {
53  $s = $up->getPageHeader();
54  }
55 
56  if ( $usersbody ) {
57  $s .= $up->getNavigationBar();
58  $s .= Html::rawElement( 'ul', [], $usersbody );
59  $s .= $up->getNavigationBar();
60  } else {
61  $s .= $this->msg( 'listusers-noresult' )->parseAsBlock();
62  }
63 
64  $this->getOutput()->addHTML( $s );
65  }
66 
72  public function getSubpagesForPrefixSearch() {
73  return User::getAllGroups();
74  }
75 
76  protected function getGroupName() {
77  return 'users';
78  }
79 }
80 
87  function __construct() {
88  parent::__construct( 'Listadmins', 'Listusers', 'sysop' );
89  }
90 }
91 
98  function __construct() {
99  parent::__construct( 'Listbots', 'Listusers', 'bot' );
100  }
101 }
SpecialListAdmins\__construct
__construct()
Definition: SpecialListusers.php:87
SpecialListAdmins
Redirect page: Special:ListAdmins --> Special:ListUsers/sysop.
Definition: SpecialListusers.php:86
SpecialPage\msg
msg( $key)
Wrapper around wfMessage that sets the current context.
Definition: SpecialPage.php:746
SpecialPage\getOutput
getOutput()
Get the OutputPage being used for this instance.
Definition: SpecialPage.php:675
SpecialListUsers\execute
execute( $par)
Show the special page.
Definition: SpecialListusers.php:42
SpecialListUsers
Definition: SpecialListusers.php:31
SpecialRedirectToSpecial
Definition: RedirectSpecialPage.php:119
$s
$s
Definition: mergeMessageFileList.php:188
IncludableSpecialPage
Shortcut to construct an includable special page.
Definition: IncludableSpecialPage.php:29
php
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
Definition: injection.txt:35
SpecialListUsers\__construct
__construct()
Definition: SpecialListusers.php:33
UsersPager
This class is used to get a list of user.
Definition: UsersPager.php:33
SpecialPage\setHeaders
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
Definition: SpecialPage.php:484
SpecialListBots
Redirect page: Special:ListBots --> Special:ListUsers/bot.
Definition: SpecialListusers.php:97
SpecialPage\getContext
getContext()
Gets the context this SpecialPage is executed in.
Definition: SpecialPage.php:648
SpecialListBots\__construct
__construct()
Definition: SpecialListusers.php:98
User\getAllGroups
static getAllGroups()
Return the set of defined explicit groups.
Definition: User.php:4885
SpecialListUsers\getSubpagesForPrefixSearch
getSubpagesForPrefixSearch()
Return an array of subpages that this special page will accept.
Definition: SpecialListusers.php:72
SpecialListUsers\getGroupName
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
Definition: SpecialListusers.php:76
Html\rawElement
static rawElement( $element, $attribs=[], $contents='')
Returns an HTML element in a string.
Definition: Html.php:209
SpecialPage\outputHeader
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages Per default the message key is the canonical name o...
Definition: SpecialPage.php:583
SpecialPage\including
including( $x=null)
Whether the special page is being evaluated via transclusion.
Definition: SpecialPage.php:226