mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/16828] Add hook event before find_users_for_notification() execute
PHPBB3-16828
This commit is contained in:
parent
90fccff6f1
commit
e5b43eabe1
1 changed files with 25 additions and 0 deletions
|
@ -255,6 +255,31 @@ class manager
|
||||||
'ignore_users' => array(),
|
'ignore_users' => array(),
|
||||||
), $options);
|
), $options);
|
||||||
|
|
||||||
|
$break = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get notification data before find_users_for_notification() execute
|
||||||
|
*
|
||||||
|
* @event core.notification_manager_add_notifications_before
|
||||||
|
* @var bool break Flag indicating if the function return after hook
|
||||||
|
* @var array notification_type_name Type identifier or array of item types
|
||||||
|
* @var string data Data specific for this type that will be inserted
|
||||||
|
* @var string options Optional options to control what notifications are loaded
|
||||||
|
* @since 3.3.5-RC1
|
||||||
|
*/
|
||||||
|
$vars = [
|
||||||
|
'break',
|
||||||
|
'notification_type_name',
|
||||||
|
'data',
|
||||||
|
'options',
|
||||||
|
];
|
||||||
|
extract($this->phpbb_dispatcher->trigger_event('core.notification_manager_add_notifications_before', compact($vars)));
|
||||||
|
|
||||||
|
if ($break)
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
if (is_array($notification_type_name))
|
if (is_array($notification_type_name))
|
||||||
{
|
{
|
||||||
$notified_users = array();
|
$notified_users = array();
|
||||||
|
|
Loading…
Add table
Reference in a new issue