MediaWiki 1.41.2
SpecialMypage.php
Go to the documentation of this file.
1<?php
28
31
38 public function __construct() {
39 parent::__construct( 'Mypage' );
40 }
41
46 public function getRedirect( $subpage ) {
47 if ( $subpage === null || $subpage === '' ) {
48 return Title::makeTitle( NS_USER, $this->getUser()->getName() );
49 }
50
51 return Title::makeTitle( NS_USER, $this->getUser()->getName() . '/' . $subpage );
52 }
53
60 public function personallyIdentifiableTarget() {
61 return true;
62 }
63}
64
69class_alias( SpecialMypage::class, 'SpecialMypage' );
const NS_USER
Definition Defines.php:66
Superclass for any RedirectSpecialPage which redirects the user to a particular article (as opposed t...
getUser()
Shortcut to get the User executing this instance.
getName()
Get the name of this Special Page.
Special page pointing to current user's user page.
personallyIdentifiableTarget()
Target identifies a specific User.
Represents a title within MediaWiki.
Definition Title.php:76