class email extends messenger_base
Email notification method class This class handles sending emails for notifications
Properties
protected manager | $notification_manager | from base | |
protected array | $queue | Queue of messages to be sent |
from base |
protected service_collection | $messenger | ||
protected user_loader | $user_loader | from messenger_base | |
protected string | $phpbb_root_path | from messenger_base | |
protected string | $php_ext | from messenger_base | |
protected user | $user | ||
protected config | $config | ||
protected driver_interface | $db | ||
protected string | $notification_emails_table |
Methods
Return the list of the users already notified
Update a notification
Mark notifications read or unread
Mark notifications read or unread from a parent identifier
Mark notifications read or unread
Delete a notification
Delete all notifications older than a certain time
Notification Method email Constructor
Is this method available for the user? This is checked on the notifications options
Notify using phpBB messenger
Get notification method name
Parse the queue and notify the users
Clean data to contain only what we need for email notifications table
Details
in
base at line 36
set_notification_manager(manager $notification_manager)
Set notification manager (required)
in
base at line 46
bool
is_enabled_by_default()
Is the method enable by default?
at line 103
array
get_notified_users(int $notification_type_id, array $options)
Return the list of the users already notified
in
base at line 62
array
load_notifications(array $options = array())
Load the user's notifications
in
base at line 76
add_to_queue(type_interface $notification)
Add a notification to the queue
in
base at line 84
update_notification(type_interface $notification, array $data, array $options)
Update a notification
at line 145
mark_notifications(bool|string|array $notification_type_id, bool|int|array $item_id, bool|int|array $user_id, bool|int $time = false, bool $mark_read = true)
Mark notifications read or unread
at line 157
mark_notifications_by_parent(string|int|array $notification_type_id, bool|int|array $item_parent_id, bool|int|array $user_id, bool|int $time = false, bool $mark_read = true)
Mark notifications read or unread from a parent identifier
in
base at line 105
mark_notifications_by_id(array|int $notification_id, bool|int $time = false, bool $mark_read = true)
Mark notifications read or unread
in
base at line 112
delete_notifications(int $notification_type_id, int|array $item_id, mixed $parent_id = false, mixed $user_id = false)
Delete a notification
in
base at line 119
prune_notifications(int $timestamp, bool $only_read = true)
Delete all notifications older than a certain time
in
base at line 126
purge_notifications(int $notification_type_id)
Purge all notifications of a certain type
This should be called when an extension which has notification types is purged so that all those notifications are removed
in
base at line 133
protected
empty_queue()
Empty the queue
at line 58
__construct(user_loader $user_loader, user $user, config $config, driver_interface $db, string $phpbb_root_path, string $php_ext, string $notification_emails_table, service_collection $messenger)
Notification Method email Constructor
at line 95
is_available(type_interface $notification_type = null)
Is this method available for the user? This is checked on the notifications options
in
messenger_base at line 75
protected void
notify_using_messenger(int $notify_method, string $template_dir_prefix = '')
Notify using phpBB messenger
at line 82
string
get_type()
Get notification method name
at line 126
notify()
Parse the queue and notify the users
at line 172
static array
clean_data(array $data)
Clean data to contain only what we need for email notifications table