MobileFrontend
MobileoptimisedfrontendforMediaWiki
SpecialMobileLanguages Class Reference

Provides a list of languages available for a page. More...

+ Inheritance diagram for SpecialMobileLanguages:
+ Collaboration diagram for SpecialMobileLanguages:

Public Member Functions

 executeWhenAvailable ( $pagename)
 Render the page with a list of languages the page is available in. More...
 
- Public Member Functions inherited from MobileSpecialPage
 __construct ( $page)
 
 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

 processLanguages ( $data)
 Processes languages to add 'langname' property, update 'url' property to mobile domain, and sort languages in case-insensitive order. More...
 
- Protected Member Functions inherited from MobileSpecialPage
 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.
 

Additional Inherited Members

- Protected Attributes inherited from MobileSpecialPage
 $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

Provides a list of languages available for a page.

Member Function Documentation

◆ executeWhenAvailable()

SpecialMobileLanguages::executeWhenAvailable (   $pagename)

Render the page with a list of languages the page is available in.

Parameters
string | null$pagenameThe name of the page
Exceptions
ErrorPageError

Reimplemented from MobileSpecialPage.

◆ processLanguages()

SpecialMobileLanguages::processLanguages (   $data)
protected

Processes languages to add 'langname' property, update 'url' property to mobile domain, and sort languages in case-insensitive order.

Parameters
array$datalist of languages to process
Returns
array list of processed languages

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