[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/actions/ -> WatchAction.php (summary)

Performs the watch actions on a page This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

File Size: 212 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

WatchAction:: (15 methods):
  getName()
  requiresUnblock()
  getDescription()
  getFormFields()
  onSubmit()
  show()
  checkCanExecute()
  doWatchOrUnwatch()
  doWatch()
  doUnwatch()
  getWatchToken()
  getUnwatchToken()
  alterForm()
  preText()
  onSuccess()


Class: WatchAction  - X-Ref

Page addition to a user's watchlist

getName()   X-Ref
No description

requiresUnblock()   X-Ref
No description

getDescription()   X-Ref
No description

getFormFields()   X-Ref
Just get an empty form with a single submit button

return: array

onSubmit( $data )   X-Ref
No description

show()   X-Ref
This can be either formed or formless depending on the session token given


checkCanExecute( User $user )   X-Ref
No description

doWatchOrUnwatch( $watch, Title $title, User $user )   X-Ref
Watch or unwatch a page

param: bool $watch Whether to watch or unwatch the page
param: Title $title Page to watch/unwatch
param: User $user User who is watching/unwatching
return: Status

doWatch( Title $title, User $user,$checkRights = WatchedItem::CHECK_USER_RIGHTS)   X-Ref
Watch a page

param: Title $title Page to watch/unwatch
param: User $user User who is watching/unwatching
param: int $checkRights Passed through to $user->addWatch()
return: Status

doUnwatch( Title $title, User $user )   X-Ref
Unwatch a page

param: Title $title Page to watch/unwatch
param: User $user User who is watching/unwatching
return: Status

getWatchToken( Title $title, User $user, $action = 'watch' )   X-Ref
Get token to watch (or unwatch) a page for a user

param: Title $title Title object of page to watch
param: User $user User for whom the action is going to be performed
param: string $action Optionally override the action to 'unwatch'
return: string Token

getUnwatchToken( Title $title, User $user, $action = 'unwatch' )   X-Ref
Get token to unwatch (or watch) a page for a user

param: Title $title Title object of page to unwatch
param: User $user User for whom the action is going to be performed
param: string $action Optionally override the action to 'watch'
return: string Token

alterForm( HTMLForm $form )   X-Ref
No description

preText()   X-Ref
No description

onSuccess()   X-Ref
No description



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1