MobileFrontend
Mobile optimised frontend for MediaWiki
Loading...
Searching...
No Matches
SpecialMobileDiff Class Reference

Show the difference between two revisions of a page. More...

+ Inheritance diagram for SpecialMobileDiff:
+ Collaboration diagram for SpecialMobileDiff:

Public Member Functions

 __construct (RevisionLookup $revLookup)
 
 showRevisionNotFound ()
 Show a nice error message when revision cannot be found.
 
 executeWhenAvailable ( $par)
 Render the diff page.
 
 getDesktopUrl ( $subPage)
 Get the URL for Desktop version of difference view.
 
- 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.
 
 setHeaders ()
 Add modules to headers.
 
 isListed ()
 Returns if this page is listed on Special:SpecialPages.
 

Static Public Member Functions

static getMobileUrlFromDesktop (WebRequest $req)
 Get the url for the mobile diff special page to use in Desktop footer.
 

Protected Member Functions

 getPrevId ()
 Returns the ID of the previous Revision, if it is set, otherwise 0.
 
 displayDiffPage ()
 Setups the mobile DifferenceEngine and displays a mobile optimised diff.
 
- Protected Member Functions inherited from MobileSpecialPage
 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 = true
 
- Protected Attributes inherited from MobileSpecialPage
 $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

Show the difference between two revisions of a page.

Constructor & Destructor Documentation

◆ __construct()

SpecialMobileDiff::__construct ( RevisionLookup $revLookup)
Parameters
RevisionLookup$revLookup

Member Function Documentation

◆ executeWhenAvailable()

SpecialMobileDiff::executeWhenAvailable ( $par)

Render the diff page.

Returns
bool false when revision not exist
Parameters
string | null$parRevision IDs separated by three points (e.g. 123...124)

Reimplemented from MobileSpecialPage.

◆ getDesktopUrl()

SpecialMobileDiff::getDesktopUrl ( $subPage)

Get the URL for Desktop version of difference view.

Parameters
string | null$subPageURL of mobile diff page
Returns
string|null Url to mobile diff page

Reimplemented from MobileSpecialPage.

◆ getMobileUrlFromDesktop()

static SpecialMobileDiff::getMobileUrlFromDesktop ( WebRequest $req)
static

Get the url for the mobile diff special page to use in Desktop footer.

Parameters
WebRequest$req
Returns
bool|string Return URL or false when revision id's not set

◆ getPrevId()

SpecialMobileDiff::getPrevId ( )
protected

Returns the ID of the previous Revision, if it is set, otherwise 0.

Returns
int|null

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