Go to the documentation of this file.
54 parent::checkCanExecute( $user );
65 'vertical-label' =>
true,
67 'default' => $this->
msg(
'confirm-watch-top' )->parse()
79 $msgKey = $this->
getTitle()->isTalkPage() ?
'addedwatchtext-talk' :
'addedwatchtext';
121 $permissionManager = MediaWikiServices::getInstance()->getPermissionManager();
122 if ( $checkRights && !$permissionManager->userHasRight( $user,
'editmywatchlist' ) ) {
146 if ( !MediaWikiServices::getInstance()
148 ->userHasRight( $user,
'editmywatchlist' ) ) {
174 if ( $action !=
'unwatch' ) {
static newFatal( $message,... $parameters)
Factory function for fatal errors.
isAnon()
Get whether the user is anonymous.
alterForm(HTMLForm $form)
Play with the HTMLForm if you need to more substantially.
onSuccess()
Do something exciting on successful processing of the form.
static newFatalPermissionDeniedStatus( $permission)
Factory function for fatal permission-denied errors.
requiresUnblock()
Whether this action can still be executed by a blocked user.
static doUnwatch(Title $title, User $user)
Unwatch a page.
Redirect a user to the login page.
getDescription()
Returns the description that goes below the <h1> tag.
Page addition to a user's watchlist.
onSubmit( $data)
Process the form on POST submission.
getFormFields()
Get an HTMLForm descriptor array.
static doWatch(Title $title, User $user, $checkRights=User::CHECK_USER_RIGHTS)
Watch a page.
doesWrites()
Indicates whether this action may perform database writes.
static factory(Title $title)
Create a WikiPage object of the appropriate class for the given title.
checkCanExecute(User $user)
Checks if the given user (identified by an object) can perform this action.
static doWatchOrUnwatch( $watch, Title $title, User $user)
Watch or unwatch a page.
addWatch( $title, $checkRights=self::CHECK_USER_RIGHTS)
Watch an article.
getUser()
Shortcut to get the User being used for this instance.
static newGood( $value=null)
Factory function for good results.
getTitle()
Shortcut to get the Title object from the page.
removeWatch( $title, $checkRights=self::CHECK_USER_RIGHTS)
Stop watching an article.
getName()
Return the name of the action this object responds to.
Represents a title within MediaWiki.
$page
Page on which we're performing the action.
isLoggedIn()
Get whether the user is logged in.
msg( $key,... $params)
Get a Message object with context set Parameters are the same as wfMessage()
getOutput()
Get the OutputPage being used for this instance.
static getWatchToken(Title $title, User $user, $action='watch')
Get token to watch (or unwatch) a page for a user.
isWatched( $title, $checkRights=self::CHECK_USER_RIGHTS)
Check the watched status of an article.
getEditToken( $salt='', $request=null)
Initialize (if necessary) and return a session token value which can be used in edit forms to show th...
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
static run( $event, array $args=[], $deprecatedVersion=null)
Call hook functions defined in Hooks::register and $wgHooks.
usesOOUI()
Whether the form should use OOUI.