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

Implements the Watchlist special page. More...

+ Inheritance diagram for SpecialMobileWatchlist:
+ Collaboration diagram for SpecialMobileWatchlist:

Public Member Functions

 executeWhenAvailable ( $par)
 Render the special page.
 
 addWatchlistHTML (IResultWrapper $res, UserIdentity $user)
 Builds the watchlist HTML inside the associated OutputPage.
 
 getShortDescription (string $path='')
 @inheritDoc
 
 getAssociatedNavigationLinks ()
 @inheritDoc
 
- 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.
 
 getDesktopUrl ( $subPage)
 When overridden in a descendant class, returns desktop URL for this special page.
 

Static Public Member Functions

static getEmptyListHtml ( $feed, $lang)
 Get the HTML needed to show if a user doesn't watch any page, show information how to watch pages where no pages have been watched.
 

Public Attributes

const LIMIT = 50
 
const VIEW_OPTION_NAME = 'mfWatchlistView'
 
const FILTER_OPTION_NAME = 'mfWatchlistFilter'
 
const VIEW_LIST = 'a-z'
 
const VIEW_FEED = 'feed'
 
const WATCHLIST_TAB_PATHS
 

Protected Member Functions

 getNSConditions ( $column)
 Returns an array of conditions restricting namespace in queries.
 
 doFeedQuery ()
 Get watchlist items for feed view.
 
 showFeedResults (IResultWrapper $res)
 Show results of doFeedQuery.
 
 showResults (IResultWrapper $res, $feed)
 Render the Watchlist items.
 
 showFeedResultRow ( $row)
 Render a result row in feed view.
 
- 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.
 

Additional Inherited Members

- 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

Implements the Watchlist special page.

Deprecated
in future this should use the core Watchlist page (T109277)

Member Function Documentation

◆ addWatchlistHTML()

SpecialMobileWatchlist::addWatchlistHTML ( IResultWrapper $res,
UserIdentity $user )

Builds the watchlist HTML inside the associated OutputPage.

Parameters
IResultWrapper$res
UserIdentity$user

◆ doFeedQuery()

SpecialMobileWatchlist::doFeedQuery ( )
protected

Get watchlist items for feed view.

Returns
IResultWrapper
See also
getNSConditions()
doPageImages()

◆ executeWhenAvailable()

SpecialMobileWatchlist::executeWhenAvailable ( $par)

Render the special page.

Parameters
string | null$parparameter submitted as subpage

Reimplemented from MobileSpecialPage.

◆ getEmptyListHtml()

static SpecialMobileWatchlist::getEmptyListHtml ( $feed,
$lang )
static

Get the HTML needed to show if a user doesn't watch any page, show information how to watch pages where no pages have been watched.

Parameters
bool$feedRender as feed (true) or list (false) view?
Language$langThe language of the current mode
Returns
string

◆ getNSConditions()

SpecialMobileWatchlist::getNSConditions ( $column)
protected

Returns an array of conditions restricting namespace in queries.

Parameters
string$columnNamespace db key
Returns
array

◆ showFeedResultRow()

SpecialMobileWatchlist::showFeedResultRow ( $row)
protected

Render a result row in feed view.

Parameters
\stdClass$rowa row of db result

◆ showFeedResults()

SpecialMobileWatchlist::showFeedResults ( IResultWrapper $res)
protected

Show results of doFeedQuery.

Parameters
IResultWrapper$resResult wrapper returned from db
See also
showResults()

◆ showResults()

SpecialMobileWatchlist::showResults ( IResultWrapper $res,
$feed )
protected

Render the Watchlist items.

When ?from not set, adds a link "more" to see the other watchlist items.

Parameters
IResultWrapper$resResult wrapper from db
bool$feedRender as feed (true) or list (false) view?

Member Data Documentation

◆ WATCHLIST_TAB_PATHS

const SpecialMobileWatchlist::WATCHLIST_TAB_PATHS
Initial value:
= [
'Special:Watchlist',
'Special:EditWatchlist'
]

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