MediaWiki
REL1_39
SpecialRedirectToSpecial.php
Go to the documentation of this file.
1
<?php
29
abstract
class
SpecialRedirectToSpecial
extends
RedirectSpecialPage
{
31
protected
$redirName
;
32
34
protected
$redirSubpage
;
35
45
public
function
__construct
(
46
$name,
$redirName
,
$redirSubpage
=
false
,
47
$allowedRedirectParams = [], $addedRedirectParams = []
48
) {
49
parent::__construct( $name );
50
$this->redirName =
$redirName
;
51
$this->redirSubpage =
$redirSubpage
;
52
$this->mAllowedRedirectParams = $allowedRedirectParams;
53
$this->mAddedRedirectParams = $addedRedirectParams;
54
}
55
60
public
function
getRedirect
( $subpage ) {
61
if
( $this->redirSubpage ===
false
) {
62
return
SpecialPage::getTitleFor
( $this->redirName, $subpage );
63
}
64
65
return
SpecialPage::getTitleFor
( $this->redirName, $this->redirSubpage );
66
}
67
}
RedirectSpecialPage
Shortcut to construct a special page alias.
Definition
RedirectSpecialPage.php:31
SpecialPage\getTitleFor
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name If you don't need a full Title object,...
Definition
SpecialPage.php:132
SpecialRedirectToSpecial
Definition
SpecialRedirectToSpecial.php:29
SpecialRedirectToSpecial\getRedirect
getRedirect( $subpage)
Definition
SpecialRedirectToSpecial.php:60
SpecialRedirectToSpecial\$redirName
string $redirName
Name of redirect target.
Definition
SpecialRedirectToSpecial.php:31
SpecialRedirectToSpecial\$redirSubpage
string false $redirSubpage
Name of subpage of redirect target.
Definition
SpecialRedirectToSpecial.php:34
SpecialRedirectToSpecial\__construct
__construct( $name, $redirName, $redirSubpage=false, $allowedRedirectParams=[], $addedRedirectParams=[])
Definition
SpecialRedirectToSpecial.php:45
includes
specialpage
SpecialRedirectToSpecial.php
Generated on Mon Dec 9 2024 07:24:40 for MediaWiki by
1.10.0