MediaWiki  master
SpecialPageFactory_deprecated.php
Go to the documentation of this file.
1 <?php
27 
28 // phpcs:disable MediaWiki.Files.ClassMatchesFilename.NotMatch
35  public static function getNames() : array {
36  return MediaWikiServices::getInstance()->getSpecialPageFactory()->getNames();
37  }
38 
39  public static function resolveAlias( $alias ) : array {
40  return MediaWikiServices::getInstance()->getSpecialPageFactory()->resolveAlias( $alias );
41  }
42 
43  public static function exists( $name ) {
44  return MediaWikiServices::getInstance()->getSpecialPageFactory()->exists( $name );
45  }
46 
47  public static function getPage( $name ) {
48  return MediaWikiServices::getInstance()->getSpecialPageFactory()->getPage( $name );
49  }
50 
51  public static function getUsablePages( User $user = null ) : array {
52  global $wgUser;
53  $user = $user ?? $wgUser;
54  return MediaWikiServices::getInstance()->getSpecialPageFactory()->getUsablePages( $user );
55  }
56 
57  public static function getRegularPages() : array {
58  return MediaWikiServices::getInstance()->getSpecialPageFactory()->getRegularPages();
59  }
60 
61  public static function getRestrictedPages( User $user = null ) : array {
62  global $wgUser;
63  $user = $user ?? $wgUser;
64  return MediaWikiServices::getInstance()->getSpecialPageFactory()->getRestrictedPages( $user );
65  }
66 
67  public static function executePath( Title &$title, IContextSource &$context, $including = false,
68  LinkRenderer $linkRenderer = null
69  ) {
70  return MediaWikiServices::getInstance()->getSpecialPageFactory()
71  ->executePath( $title, $context, $including, $linkRenderer );
72  }
73 
74  public static function capturePath(
75  Title $title, IContextSource $context, LinkRenderer $linkRenderer = null
76  ) {
77  return MediaWikiServices::getInstance()->getSpecialPageFactory()
78  ->capturePath( $title, $context, $linkRenderer );
79  }
80 
81  public static function getLocalNameFor( $name, $subpage = false ) {
82  return MediaWikiServices::getInstance()->getSpecialPageFactory()
83  ->getLocalNameFor( $name, $subpage );
84  }
85 
86  public static function getTitleForAlias( $alias ) {
87  return MediaWikiServices::getInstance()->getSpecialPageFactory()
88  ->getTitleForAlias( $alias );
89  }
90 
94  public static function resetList() {
95  }
96 }
$context
Definition: load.php:45
static getLocalNameFor( $name, $subpage=false)
The User object encapsulates all of the user-specific settings (user_id, name, rights, email address, options, last login time).
Definition: User.php:51
Class that generates HTML links for pages.
Wrapper for backward compatibility for old callers that used static methods.
static getRestrictedPages(User $user=null)
static resetList()
No-op since 1.32, call overrideMwServices() instead.
static capturePath(Title $title, IContextSource $context, LinkRenderer $linkRenderer=null)
static getUsablePages(User $user=null)
static executePath(Title &$title, IContextSource &$context, $including=false, LinkRenderer $linkRenderer=null)