MobileFrontend
MobileoptimisedfrontendforMediaWiki
MobileSpecialPage Class Reference

Basic mobile implementation of SpecialPage to use in specific mobile special pages. More...

+ Inheritance diagram for MobileSpecialPage:
+ Collaboration diagram for MobileSpecialPage:

Public Member Functions

 __construct ( $page)
 
 executeWhenAvailable ( $subPage)
 Executes the page when available in the current $mode. More...
 
 execute ( $subPage)
 Checks the availability of the special page in actual mode and display the page, if available. More...
 
 setHeaders ()
 Add modules to headers and wrap content in div.content if unstyledContent = true.
 
 isListed ()
 Returns if this page is listed on Special:SpecialPages. More...
 
 getDesktopUrl ( $subPage)
 When overridden in a descendant class, returns desktop URL for this special page. More...
 

Protected Member Functions

 renderUnavailableBanner ( $msg)
 Renders a banner telling the user the page is unavailable. More...
 
 addModules ()
 Add mobile special page specific modules (styles and scripts)
 
 showPageNotFound ()
 Render mobile specific error page, when special page can not be found.
 

Protected Attributes

 $hasDesktopVersion = false
 
 $mode = 'stable'
 
 $listed = false
 
 $unstyledContent = true
 
 $config = null
 
 $errorNotFoundTitleMsg = 'mobile-frontend-generic-404-title'
 
 $errorNotFoundDescriptionMsg = 'mobile-frontend-generic-404-desc'
 
 $mobileContext
 

Detailed Description

Basic mobile implementation of SpecialPage to use in specific mobile special pages.

Constructor & Destructor Documentation

◆ __construct()

MobileSpecialPage::__construct (   $page)
Parameters
string$page

Member Function Documentation

◆ execute()

MobileSpecialPage::execute (   $subPage)

Checks the availability of the special page in actual mode and display the page, if available.

Parameters
string | null$subPageparameter submitted as "subpage"

Reimplemented in SpecialMobileOptions, and MobileSpecialPageFeed.

◆ executeWhenAvailable()

MobileSpecialPage::executeWhenAvailable (   $subPage)

Executes the page when available in the current $mode.

Parameters
string | null$subPageparameter as subpage of specialpage

Reimplemented in SpecialMobileHistory, SpecialMobileContributions, SpecialMobileMenu, SpecialNearby, SpecialUploads, SpecialMobileDiff, SpecialMobileWatchlist, and SpecialMobileLanguages.

◆ getDesktopUrl()

MobileSpecialPage::getDesktopUrl (   $subPage)

When overridden in a descendant class, returns desktop URL for this special page.

Parameters
string | null$subPageSubpage passed in URL
Returns
string|null Desktop URL for this special page or null if a standard one should be used

Reimplemented in SpecialMobileDiff, SpecialMobileHistory, and SpecialMobileContributions.

◆ isListed()

MobileSpecialPage::isListed ( )

Returns if this page is listed on Special:SpecialPages.

Returns
bool

◆ renderUnavailableBanner()

MobileSpecialPage::renderUnavailableBanner (   $msg)
protected

Renders a banner telling the user the page is unavailable.

Parameters
string$msgMessage to display

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