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

A special page to show the contributions of a user. More...

+ Inheritance diagram for SpecialMobileContributions:
+ Collaboration diagram for SpecialMobileContributions:

Public Member Functions

 executeWhenAvailable ( $par='')
 Render the special page body.
 
 getDesktopUrl ( $subPage)
 Get the URL to go to desktop site of this 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 and wrap content in div.content if unstyledContent = true.
 
 isListed ()
 Returns if this page is listed on Special:SpecialPages.
 

Protected Member Functions

 getHeaderBarLink ( $title)
 Gets HTML to place in the header bar.
 
 showContributions (IResultWrapper $res, ContribsPager $pager)
 Render the contributions of user to page.
 
- Protected Member Functions inherited from SpecialMobileHistory
 getQueryConditions ()
 Returns a list of query conditions that should be run against the revision table.
 
 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 ( $ts, $diffLink='', $username='', $comment='', $title=null, $isAnon=false, $bytes=0, $isMinor=false)
 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.
 

Protected Attributes

 $specialPageName = 'Contributions'
 
 $user
 
 $lastDate
 
 $showUsername = false
 
 $prevLengths = []
 
 $errorNotFoundTitleMsg = 'mobile-frontend-contributions-404-title'
 
 $errorNotFoundDescriptionMsg = 'mobile-frontend-contributions-404-desc'
 
- Protected Attributes inherited from SpecialMobileHistory
 $hasDesktopVersion = true
 
 $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
 
 $mode = 'stable'
 
 $listed = false
 
 $unstyledContent = true
 
 $config = null
 
 $errorNotFoundTitleMsg = 'mobile-frontend-generic-404-title'
 
 $errorNotFoundDescriptionMsg = 'mobile-frontend-generic-404-desc'
 
 $mobileContext
 
 $userOptionsLookup
 
 $userGroupManager
 

Additional Inherited Members

- Static Public Member Functions inherited from SpecialMobileHistory
static shouldUseSpecialHistory (Title $title, User $user)
 Checks, if the given title supports the use of SpecialMobileHistory.
 
- Public Attributes inherited from SpecialMobileHistory
const LIMIT = 50
 
const DB_REVISIONS_TABLE = 'revision'
 

Detailed Description

A special page to show the contributions of a user.

Todo:
FIXME: On Special:Contributions add ability to filter a la desktop

Member Function Documentation

◆ executeWhenAvailable()

SpecialMobileContributions::executeWhenAvailable (   $par = '')

Render the special page body.

Parameters
string | null$parThe username

Reimplemented from SpecialMobileHistory.

◆ getDesktopUrl()

SpecialMobileContributions::getDesktopUrl (   $subPage)

Get the URL to go to desktop site of this page.

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

Reimplemented from SpecialMobileHistory.

◆ getHeaderBarLink()

SpecialMobileContributions::getHeaderBarLink (   $title)
protected

Gets HTML to place in the header bar.

Title should always refer to a logged in user

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

Reimplemented from SpecialMobileHistory.

◆ showContributions()

SpecialMobileContributions::showContributions ( IResultWrapper  $res,
ContribsPager  $pager 
)
protected

Render the contributions of user to page.

Parameters
IResultWrapper$resResult of doQuery
ContribsPager$pager

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