MediaWiki  master
MediaWiki\Hook\GetNewMessagesAlertHook Interface Reference

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

Inheritance diagram for MediaWiki\Hook\GetNewMessagesAlertHook:

Public Member Functions

 onGetNewMessagesAlert (&$newMessagesAlert, $newtalks, $user, $out)
 Use this hook to disable or modify the new messages alert. More...
 

Detailed Description

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

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

Stable to implement

Definition at line 15 of file GetNewMessagesAlertHook.php.

Member Function Documentation

◆ onGetNewMessagesAlert()

MediaWiki\Hook\GetNewMessagesAlertHook::onGetNewMessagesAlert ( $newMessagesAlert,
  $newtalks,
  $user,
  $out 
)

Use this hook to disable or modify the new messages alert.

Since
1.35
Parameters
string&$newMessagesAlertEmpty string by default. If the user has new talk page messages, this should be populated with an alert message to that effect.
array$newtalksEmpty array if the user has no new messages, or an array containing links and revisions if there are new messages. (See User::getNewMessageLinks.)
User$userUser who is loading the page
OutputPage$outTo check what type of page the user is on
Returns
bool|void True or no return value to continue or false to abort

Implemented in MediaWiki\HookContainer\HookRunner.


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