MediaWiki master
SpecialMypage.php
Go to the documentation of this file.
1<?php
23
26
33 public function __construct() {
34 parent::__construct( 'Mypage' );
35 }
36
41 public function getRedirect( $subpage ) {
42 if ( $subpage === null || $subpage === '' ) {
43 return Title::makeTitle( NS_USER, $this->getUser()->getName() );
44 }
45
46 return Title::makeTitle( NS_USER, $this->getUser()->getName() . '/' . $subpage );
47 }
48
55 public function personallyIdentifiableTarget() {
56 return true;
57 }
58}
59
64class_alias( SpecialMypage::class, 'SpecialMypage' );
const NS_USER
Definition Defines.php:67
Helper for any RedirectSpecialPage which redirects the user to a particular article (as opposed to us...
getUser()
Shortcut to get the User executing this instance.
getName()
Get the canonical, unlocalized name of this special page without namespace.
Redirect to the current user's user page.
personallyIdentifiableTarget()
Target identifies a specific User.
Represents a title within MediaWiki.
Definition Title.php:79