MobileFrontend
Mobile optimised frontend for MediaWiki
Loading...
Searching...
No Matches
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.
 
 execute ( $subPage)
 Checks the availability of the special page in actual mode and display the page, if available.
 
 setHeaders ()
 Add modules to headers.
 
 isListed ()
 Returns if this page is listed on Special:SpecialPages.
 
 getDesktopUrl ( $subPage)
 When overridden in a descendant class, returns desktop URL for this special page.
 

Protected Member Functions

 renderUnavailableBanner ( $msg)
 Renders a banner telling the user the page is unavailable.
 
 addModules ()
 Add mobile special page specific modules (styles and scripts)
 
 showPageNotFound ()
 Render mobile specific error page, when special page can not be found.
 
 getUserOptionsLookup ()
 Get a user options lookup object.
 
 getUserGroupManager ()
 Get a user group manager object.
 
 getUserFactory ()
 Get a user factory object for creating UserIdentify object.
 

Protected Attributes

 $hasDesktopVersion = false
 
 $listed = false
 
 $config = null
 
 $errorNotFoundTitleMsg = 'mobile-frontend-generic-404-title'
 
 $errorNotFoundDescriptionMsg = 'mobile-frontend-generic-404-desc'
 
 $mobileContext
 
 $userOptionsLookup
 
 $userGroupManager
 
 $userFactory
 
 $commentFormatter
 

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 MobileSpecialPageFeed, and SpecialMobileOptions.

◆ executeWhenAvailable()

MobileSpecialPage::executeWhenAvailable ( $subPage)

Executes the page when available in the current $mode.

Parameters
string | null$subPageparameter as subpage of specialpage

Reimplemented in SpecialMobileDiff, SpecialMobileWatchlist, and SpecialMobileHistory.

◆ 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, and SpecialMobileHistory.

◆ getUserFactory()

MobileSpecialPage::getUserFactory ( )
protected

Get a user factory object for creating UserIdentify object.

Returns
UserFactory

◆ getUserGroupManager()

MobileSpecialPage::getUserGroupManager ( )
protected

Get a user group manager object.

Returns
UserGroupManager

◆ getUserOptionsLookup()

MobileSpecialPage::getUserOptionsLookup ( )
protected

Get a user options lookup object.

Returns
UserOptionsLookup

◆ 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: