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

Mobile formatted history of a page. More...

+ Inheritance diagram for SpecialMobileHistory:
+ Collaboration diagram for SpecialMobileHistory:

Public Member Functions

 __construct (NamespaceInfo $namespaceInfo, RevisionFactory $revisionFactory)
 
 executeWhenAvailable ( $par='')
 Render the special page.
 
 getDesktopUrl ( $subPage)
 Returns desktop URL for this special page.
 
- Public Member Functions inherited from MobileSpecialPageFeed
 execute ( $par)
 Render the special page content.
 
- Public Member Functions inherited from MobileSpecialPage
 __construct ( $page)
 
 setHeaders ()
 Add modules to headers.
 
 isListed ()
 Returns if this page is listed on Special:SpecialPages.
 

Static Public Member Functions

static shouldUseSpecialHistory (Title $title, User $user)
 Checks, if the given title supports the use of SpecialMobileHistory.
 

Protected Member Functions

 getQueryConditions ()
 Returns a list of query conditions that should be run against the revision table.
 
 getHeaderBarLink ( $title)
 Gets HTML to place in the header bar.
 
 renderHeaderBar (Title $title)
 Adds HTML to render a header at the top of the feed.
 
 doQuery ()
 Executes the database query and returns the result.
 
 getMoreButton ( $ts)
 Get a button to show more entries of history.
 
 showHistory (IResultWrapper $res)
 Render the history list.
 
- Protected Member Functions inherited from MobileSpecialPageFeed
 formatComment ( $comment, $title)
 Formats an edit comment.
 
 renderListHeaderWhereNeeded ( $date)
 Renders a date header when necessary.
 
 getRevisionCommentHTML (RevisionRecord $rev, $user, $unhide)
 Generates revision text based on user's rights and preference.
 
 getUsernameText ( $rev, $user, $unhide)
 Generates username text based on user's rights and preference.
 
 renderFeedItemHtml (array $options)
 Renders an item in the feed.
 
- 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
 
const LIMIT = 50
 
 $offset
 
 $specialPageName = 'History'
 
 $title
 
 $errorNotFoundTitleMsg = 'mobile-frontend-history-404-title'
 
 $errorNotFoundDescriptionMsg = 'mobile-frontend-history-404-desc'
 
- Protected Attributes inherited from MobileSpecialPageFeed
 $showUsername = true
 
 $lastDate
 
 $title
 
- 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

Mobile formatted history of a page.

Constructor & Destructor Documentation

◆ __construct()

SpecialMobileHistory::__construct ( NamespaceInfo $namespaceInfo,
RevisionFactory $revisionFactory )
Parameters
NamespaceInfo$namespaceInfo
RevisionFactory$revisionFactory

Member Function Documentation

◆ doQuery()

SpecialMobileHistory::doQuery ( )
protected

Executes the database query and returns the result.

See also
getQueryConditions()
Returns
IResultWrapper

◆ executeWhenAvailable()

SpecialMobileHistory::executeWhenAvailable ( $par = '')

Render the special page.

Parameters
string | null$parparameter as subpage of specialpage

Reimplemented from MobileSpecialPage.

◆ getDesktopUrl()

SpecialMobileHistory::getDesktopUrl ( $subPage)

Returns desktop URL for this special page.

Parameters
string | null$subPageSubpage passed in URL
Returns
string

Reimplemented from MobileSpecialPage.

◆ getHeaderBarLink()

SpecialMobileHistory::getHeaderBarLink ( $title)
protected

Gets HTML to place in the header bar.

Parameters
Title$titleThe page to link to
Returns
string HTML representing the link in the header bar

◆ getMoreButton()

SpecialMobileHistory::getMoreButton ( $ts)
protected

Get a button to show more entries of history.

Parameters
string | null$tsThe offset to start the history list from
Returns
string

◆ getQueryConditions()

SpecialMobileHistory::getQueryConditions ( )
protected

Returns a list of query conditions that should be run against the revision table.

Returns
array List of conditions

◆ renderHeaderBar()

SpecialMobileHistory::renderHeaderBar ( Title $title)
protected

Adds HTML to render a header at the top of the feed.

Parameters
Title$titleThe page to link to

◆ shouldUseSpecialHistory()

static SpecialMobileHistory::shouldUseSpecialHistory ( Title $title,
User $user )
static

Checks, if the given title supports the use of SpecialMobileHistory.

Parameters
Title$titleThe title to check
User$userthe user to check
Returns
bool True, if SpecialMobileHistory can be used, false otherwise

◆ showHistory()

SpecialMobileHistory::showHistory ( IResultWrapper $res)
protected

Render the history list.

See also
showRow()
doQuery()
Parameters
IResultWrapper$resThe result of doQuery

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