MediaWiki master
MediaWiki\Hook\WatchArticleHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onWatchArticle ( $user, $page, &$status, $expiry)
 This hook is called before a watch is added to an article.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "WatchArticle" to register handlers implementing this interface.

Stability: stable
to implement

Definition at line 16 of file WatchArticleHook.php.

Member Function Documentation

◆ onWatchArticle()

MediaWiki\Hook\WatchArticleHook::onWatchArticle ( $user,
$page,
& $status,
$expiry )

This hook is called before a watch is added to an article.

Since
1.35
Parameters
User$userUser that will watch
WikiPage$pageWikiPage object to be watched
Status&$statusStatus object to be returned if the hook returns false
string | null$expiryOptional expiry timestamp in any format acceptable to wfTimestamp()
Returns
bool|void True or no return value to continue or false to abort and return Status object

Implemented in MediaWiki\HookContainer\HookRunner.


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