wiki.techinc.nl/includes/skins/Hook/GetNewMessagesAlertHook.php
daniel 2e57447c58 Document hook names in hook interfaces.
Bug: T258665
Change-Id: Ifddbf57f8aa2e3eb0d5845601376cbafa08ed407
2020-09-27 12:03:12 +02:00

33 lines
1 KiB
PHP

<?php
namespace MediaWiki\Hook;
use OutputPage;
use User;
/**
* This is a hook handler interface, see docs/Hooks.md.
* Use the hook name "GetNewMessagesAlert" to register handlers implementing this interface.
*
* @stable to implement
* @ingroup Hooks
*/
interface GetNewMessagesAlertHook {
/**
* Use this hook to disable or modify the new messages alert.
*
* @since 1.35
*
* @param string &$newMessagesAlert Empty string by default. If the user has new talk page
* messages, this should be populated with an alert message to that effect.
* @param array $newtalks Empty array if the user has no new messages, or an array
* containing links and revisions if there are new messages. (See
* User::getNewMessageLinks.)
* @param User $user User who is loading the page
* @param OutputPage $out To check what type of page the user is on
* @return bool|void True or no return value to continue or false to abort
*/
public function onGetNewMessagesAlert( &$newMessagesAlert, $newtalks, $user,
$out
);
}