Debian Codegraph @

includes/skins/Hook/GetNewMessagesAlertHook.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\Hook;
4
5 use MediaWiki\Output\OutputPage;
6 use MediaWiki\User\User;
7
8 /**
9 * This is a hook handler interface, see docs/Hooks.md.
10 * Use the hook name "GetNewMessagesAlert" to register handlers implementing this interface.
11 *
12 * @stable to implement
13 * @ingroup Hooks
14 */
15 interface GetNewMessagesAlertHook {
16 /**
17 * Use this hook to disable or modify the new messages alert.
18 *
19 * @since 1.35
20 *
21 * @param string &$newMessagesAlert Empty string by default. If the user has new talk page
22 * messages, this should be populated with an alert message to that effect.
23 * @param array $newtalks Empty array if the user has no new messages, or an array
24 * containing links and revisions if there are new messages. (See
25 * Skin::getNewtalks().)
26 * @param User $user User who is loading the page
27 * @param OutputPage $out To check what type of page the user is on
28 * @return bool|void True or no return value to continue or false to abort
29 */
30 public function onGetNewMessagesAlert( &$newMessagesAlert, $newtalks, $user,
31 $out
32 );
33 }