33 private $watchlistManager;
47 parent::__construct(
$page,
$context, $watchlistManager, $watchedItemStore );
48 $this->watchlistManager = $watchlistManager;
56 $this->watchlistManager->removeWatch(
69 'default' => $this->
msg(
'confirm-unwatch-top' )->parse()
75 parent::alterForm( $form );
81 $msgKey = $this->
getTitle()->isTalkPage() ?
'removedwatchtext-talk' :
'removedwatchtext';
IContextSource null $context
IContextSource if specified; otherwise we'll use the Context from the Page.
WikiPage Article ImagePage CategoryPage Page $page
Page on which we're performing the action.
getTitle()
Shortcut to get the Title object from the page.
getOutput()
Get the OutputPage being used for this instance.
msg( $key,... $params)
Get a Message object with context set Parameters are the same as wfMessage()
getAuthority()
Shortcut to get the Authority executing this instance.
Page removal from a user's watchlist.
onSubmit( $data)
Process the form on POST submission.
getFormFields()
Get an HTMLForm descriptor array.
__construct(Page $page, IContextSource $context, WatchlistManager $watchlistManager, WatchedItemStore $watchedItemStore)
getName()
Return the name of the action this object responds to.
onSuccess()
Show one of 8 possible success messages.
alterForm(HTMLForm $form)
Play with the HTMLForm if you need to more substantially.
Page addition to a user's watchlist.
Storage layer class for WatchedItems.
Interface for objects which can provide a MediaWiki context on request.
Interface for type hinting (accepts WikiPage, Article, ImagePage, CategoryPage)