MediaWiki  REL1_19
SpecialPage.php File Reference

SpecialPage: handling special pages and lists thereof. More...

Go to the source code of this file.

Classes

class  FormSpecialPage
 Special page which uses an HTMLForm to handle processing. More...
class  IncludableSpecialPage
 Shortcut to construct an includable special page. More...
class  RedirectSpecialPage
 Shortcut to construct a special page alias. More...
class  SpecialCreateAccount
 CreateAccount --> UserLogin/signup. More...
class  SpecialListAdmins
 ListAdmins --> ListUsers/sysop. More...
class  SpecialListBots
 ListBots --> ListUsers/bot. More...
class  SpecialMycontributions
 Shortcut to construct a special page pointing to current user contributions. More...
class  SpecialMypage
 SpecialMypage, SpecialMytalk and SpecialMycontributions special pages are used to get user independant links pointing to the user page, talk page and list of contributions. More...
class  SpecialMytalk
 Shortcut to construct a special page pointing to current user talk page. More...
class  SpecialMyuploads
 Redirect to Special:Listfiles?user=$wgUser. More...
class  SpecialPage
 Parent special page class, also static functions for handling the special page list. More...
class  SpecialPermanentLink
 Redirect from Special:PermanentLink/### to index.php?oldid=###. More...
class  SpecialRedirectToSpecial
class  UnlistedSpecialPage
 Shortcut to construct a special page which is unlisted by default. More...

Detailed Description

SpecialPage: handling special pages and lists thereof.

To add a special page in an extension, add to $wgSpecialPages either an object instance or an array containing the name and constructor parameters. The latter is preferred for performance reasons.

The object instantiated must be either an instance of SpecialPage or a sub-class thereof. It must have an execute() method, which sends the HTML for the special page to $wgOut. The parent class has an execute() method which distributes the call to the historical global functions. Additionally, execute() also checks if the user has the necessary access privileges and bails out if not.

To add a core special page, use the similar static list in SpecialPage::$mList. To remove a core static special page at runtime, use a SpecialPage_initList hook.

Definition in file SpecialPage.php.