MediaWiki REL1_35
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 wfDeprecated( __METHOD__, '1.32' );
37 return MediaWikiServices::getInstance()->getSpecialPageFactory()->getNames();
38 }
39
40 public static function resolveAlias( $alias ) : array {
41 wfDeprecated( __METHOD__, '1.32' );
42 return MediaWikiServices::getInstance()->getSpecialPageFactory()->resolveAlias( $alias );
43 }
44
45 public static function exists( $name ) {
46 wfDeprecated( __METHOD__, '1.32' );
47 return MediaWikiServices::getInstance()->getSpecialPageFactory()->exists( $name );
48 }
49
50 public static function getPage( $name ) {
51 wfDeprecated( __METHOD__, '1.32' );
52 return MediaWikiServices::getInstance()->getSpecialPageFactory()->getPage( $name );
53 }
54
55 public static function getUsablePages( User $user = null ) : array {
56 wfDeprecated( __METHOD__, '1.32' );
57 global $wgUser;
58 $user = $user ?? $wgUser;
59 return MediaWikiServices::getInstance()->getSpecialPageFactory()->getUsablePages( $user );
60 }
61
62 public static function getRegularPages() : array {
63 wfDeprecated( __METHOD__, '1.32' );
64 return MediaWikiServices::getInstance()->getSpecialPageFactory()->getRegularPages();
65 }
66
67 public static function getRestrictedPages( User $user = null ) : array {
68 wfDeprecated( __METHOD__, '1.32' );
69 global $wgUser;
70 $user = $user ?? $wgUser;
71 return MediaWikiServices::getInstance()->getSpecialPageFactory()->getRestrictedPages( $user );
72 }
73
74 public static function executePath( Title &$title, IContextSource &$context, $including = false,
75 LinkRenderer $linkRenderer = null
76 ) {
77 wfDeprecated( __METHOD__, '1.32' );
78 return MediaWikiServices::getInstance()->getSpecialPageFactory()
79 ->executePath( $title, $context, $including, $linkRenderer );
80 }
81
82 public static function capturePath(
83 Title $title, IContextSource $context, LinkRenderer $linkRenderer = null
84 ) {
85 wfDeprecated( __METHOD__, '1.32' );
86 return MediaWikiServices::getInstance()->getSpecialPageFactory()
87 ->capturePath( $title, $context, $linkRenderer );
88 }
89
90 public static function getLocalNameFor( $name, $subpage = false ) {
91 wfDeprecated( __METHOD__, '1.32' );
92 return MediaWikiServices::getInstance()->getSpecialPageFactory()
93 ->getLocalNameFor( $name, $subpage );
94 }
95
96 public static function getTitleForAlias( $alias ) {
97 wfDeprecated( __METHOD__, '1.32' );
98 return MediaWikiServices::getInstance()->getSpecialPageFactory()
99 ->getTitleForAlias( $alias );
100 }
101
105 public static function resetList() {
106 wfDeprecated( __METHOD__, '1.32' );
107 }
108}
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Logs a warning that $function is deprecated.
Class that generates HTML links for pages.
MediaWikiServices is the service locator for the application scope of MediaWiki.
Wrapper for backward compatibility for old callers that used static methods.
static capturePath(Title $title, IContextSource $context, LinkRenderer $linkRenderer=null)
static getLocalNameFor( $name, $subpage=false)
static executePath(Title &$title, IContextSource &$context, $including=false, LinkRenderer $linkRenderer=null)
static getUsablePages(User $user=null)
static resetList()
No-op since 1.32, call overrideMwServices() instead.
static getRestrictedPages(User $user=null)
Represents a title within MediaWiki.
Definition Title.php:42
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
Definition User.php:60
Interface for objects which can provide a MediaWiki context on request.