MediaWiki  1.34.0
SpecialMypage.php
Go to the documentation of this file.
1 <?php
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 }
SpecialMypage
Special page pointing to current user's user page.
Definition: SpecialMypage.php:32
SpecialMypage\getRedirect
getRedirect( $subpage)
Definition: SpecialMypage.php:41
SpecialPage\getName
getName()
Get the name of this Special Page.
Definition: SpecialPage.php:153
SpecialPage\getUser
getUser()
Shortcut to get the User executing this instance.
Definition: SpecialPage.php:729
Title\makeTitle
static makeTitle( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
Definition: Title.php:586
SpecialMypage\personallyIdentifiableTarget
personallyIdentifiableTarget()
Target identifies a specific User.
Definition: SpecialMypage.php:55
RedirectSpecialArticle
Superclass for any RedirectSpecialPage which redirects the user to a particular article (as opposed t...
Definition: RedirectSpecialArticle.php:87
SpecialMypage\__construct
__construct()
Definition: SpecialMypage.php:33
NS_USER
const NS_USER
Definition: Defines.php:62