MediaWiki master
MediaWiki\Skin\SkinComponentUtils Class Reference

Static Public Member Functions

static addClassToClassList ( $class, string $newClass)
 Adds a class to the existing class value, supporting it as a string or array.
 
static getReturnToParam ( $title, $request, $authority)
 Builds query params for the page to return to, used when building links.
 
static makeSpecialUrl ( $name, $urlaction='', $proto=null)
 Make a URL for a Special Page using the given query and protocol.
 
static makeSpecialUrlSubpage ( $name, $subpage, $urlaction='')
 

Detailed Description

Definition at line 10 of file SkinComponentUtils.php.

Member Function Documentation

◆ addClassToClassList()

static MediaWiki\Skin\SkinComponentUtils::addClassToClassList (   $class,
string  $newClass 
)
static

Adds a class to the existing class value, supporting it as a string or array.

Parameters
string | array$classto update.
string$newClassto add.
Returns
string|array classes.
Access: internal

Definition at line 20 of file SkinComponentUtils.php.

◆ getReturnToParam()

static MediaWiki\Skin\SkinComponentUtils::getReturnToParam (   $title,
  $request,
  $authority 
)
static

Builds query params for the page to return to, used when building links.

Stability: unstable
Parameters
Title$title
WebRequest$request
Authority$authority
Returns
string[]

Definition at line 39 of file SkinComponentUtils.php.

References wfArrayToCgi(), and wfCgiToArray().

◆ makeSpecialUrl()

static MediaWiki\Skin\SkinComponentUtils::makeSpecialUrl (   $name,
  $urlaction = '',
  $proto = null 
)
static

Make a URL for a Special Page using the given query and protocol.

If $proto is set to null, make a local URL. Otherwise, make a full URL with the protocol specified.

Parameters
string$nameName of the Special page
string | array$urlactionQuery to append
string | null$protoProtocol to use or null for a local URL
Returns
string

Definition at line 86 of file SkinComponentUtils.php.

References MediaWiki\SpecialPage\SpecialPage\getSafeTitleFor().

Referenced by MediaWiki\Skin\SkinComponentTempUserBanner\__construct().

◆ makeSpecialUrlSubpage()

static MediaWiki\Skin\SkinComponentUtils::makeSpecialUrlSubpage (   $name,
  $subpage,
  $urlaction = '' 
)
static
Parameters
string$name
string | bool$subpagefalse for no subpage
string | array$urlaction
Returns
string

Definition at line 101 of file SkinComponentUtils.php.

References MediaWiki\SpecialPage\SpecialPage\getSafeTitleFor().


The documentation for this class was generated from the following file: