MediaWiki
REL1_34
SpecialRedirectToSpecial.php
Go to the documentation of this file.
1
<?php
27
abstract
class
SpecialRedirectToSpecial
extends
RedirectSpecialPage
{
29
protected
$redirName
;
30
32
protected
$redirSubpage
;
33
34
function
__construct
(
35
$name,
$redirName
,
$redirSubpage
=
false
,
36
$allowedRedirectParams = [], $addedRedirectParams = []
37
) {
38
parent::__construct( $name );
39
$this->redirName =
$redirName
;
40
$this->redirSubpage =
$redirSubpage
;
41
$this->mAllowedRedirectParams = $allowedRedirectParams;
42
$this->mAddedRedirectParams = $addedRedirectParams;
43
}
44
49
public
function
getRedirect
( $subpage ) {
50
if
( $this->redirSubpage ===
false
) {
51
return
SpecialPage::getTitleFor
( $this->redirName, $subpage );
52
}
53
54
return
SpecialPage::getTitleFor
( $this->redirName, $this->redirSubpage );
55
}
56
}
RedirectSpecialPage
Shortcut to construct a special page alias.
Definition
RedirectSpecialPage.php:29
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:83
SpecialRedirectToSpecial
Definition
SpecialRedirectToSpecial.php:27
SpecialRedirectToSpecial\getRedirect
getRedirect( $subpage)
Definition
SpecialRedirectToSpecial.php:49
SpecialRedirectToSpecial\$redirName
string $redirName
Name of redirect target.
Definition
SpecialRedirectToSpecial.php:29
SpecialRedirectToSpecial\__construct
__construct( $name, $redirName, $redirSubpage=false, $allowedRedirectParams=[], $addedRedirectParams=[])
Definition
SpecialRedirectToSpecial.php:34
SpecialRedirectToSpecial\$redirSubpage
string $redirSubpage
Name of subpage of redirect target.
Definition
SpecialRedirectToSpecial.php:32
includes
specialpage
SpecialRedirectToSpecial.php
Generated on Fri Apr 5 2024 23:10:34 for MediaWiki by
1.9.8