topic_in_queue
class topic_in_queue extends topic
Topic in queue notifications class This class handles notifications for topics when they are put in the moderation queue (for moderators)
Properties
protected manager | $notification_manager | from base | |
protected driver_interface | $db | from base | |
protected language | $language | from base | |
protected user | $user | from base | |
protected auth | $auth | from base | |
protected string | $phpbb_root_path | from base | |
protected string | $php_ext | from base | |
protected string | $user_notifications_table | from base | |
static bool|array | $notification_option | Notification option data (for outputting to the user) |
|
protected int | $notification_type_id | The notification_type_id, set upon creation of the class This is the notification_type_id from the notification_types table |
from base |
protected string | $language_key | Language key used to output the text |
|
protected bool | $inherit_read_status | Inherit notification read status from topic. |
from topic |
protected user_loader | $user_loader | from topic | |
protected config | $config | from topic | |
protected string | $permission | Permission to check for (in find_users_for_notification) |
Methods
Notification Type Base Constructor
Get special data (only important for the classes that extend this)
Set special data (only important for the classes that extend this)
Function for preparing the data for insertion in an SQL query
Function for getting the data for insertion in an SQL query
Function for preparing the data for update in an SQL query (The service handles insertion)
URL to unsubscribe to this notification (fall back)
Is available
Pre create insert array function This allows you to perform certain actions, like run a query and load data, before create_insert_array() is run. The data returned from this function will be sent to create_insert_array().
Find the users who want to receive notifications (helper)
Mark this item read/unread helper
Get a list of users that are authorised to receive notifications
Get notification type name
Find the users who want to receive notifications
Get email template
Get the url to this item
Details
in
base at line 87
__construct(driver_interface $db, language $language, user $user, auth $auth, string $phpbb_root_path, string $php_ext, string $user_notifications_table)
Notification Type Base Constructor
in
base at line 105
set_notification_manager(manager $notification_manager)
Set notification manager (required)
in
base at line 117
set_initial_data(array $data = array())
Set initial data from the database
in
base at line 130
mixed
__get(mixed $name)
Magic method to get data from this notification
in
base at line 144
null
__set(mixed $name, mixed $value)
Magic method to set data on this notification
in
base at line 157
mixed
__toString()
Magic method to get a string of this notification
Primarily for testing
in
base at line 168
protected mixed
get_data(string $name)
Get special data (only important for the classes that extend this)
in
base at line 180
protected mixed
set_data(string $name, mixed $value)
Set special data (only important for the classes that extend this)
at line 128
create_insert_array($topic, array $pre_create_data = array())
Function for preparing the data for insertion in an SQL query
at line 138
array
get_insert_array()
Function for getting the data for insertion in an SQL query
in
base at line 222
array
create_update_array(array $type_data)
Function for preparing the data for update in an SQL query (The service handles insertion)
in
base at line 244
string
mark_read(bool $return = false)
Mark this item read
in
base at line 255
string
mark_unread(bool $return = false)
Mark this item unread
in
base at line 263
string
get_redirect_url()
{inheritDoc}
in
base at line 273
prepare_for_display()
Prepare to output the notification to the template
in
base at line 313
get_unsubscribe_url(string|bool $method = false)
URL to unsubscribe to this notification (fall back)
in
base at line 323
string
get_style_class()
Get the CSS style class of the notification (fall back)
in
topic at line 138
string
get_avatar()
Get the user's avatar
in
topic at line 170
string
get_reference()
Get the HTML formatted reference of the notification
in
topic at line 183
string
get_forum()
Get the forum of the notification reference
in
base at line 363
string
get_reason()
Get the reason for the notification (fall back)
in
base at line 373
array
get_load_special()
Get the special items to load (fall back)
in
base at line 384
load_special(array $data, array $notifications)
Load the special items (fall back)
at line 62
bool
is_available()
Is available
in
topic at line 262
array
pre_create_insert_array(array $post, array $notify_users)
Pre create insert array function This allows you to perform certain actions, like run a query and load data, before create_insert_array() is run. The data returned from this function will be sent to create_insert_array().
in
base at line 423
protected array
check_user_notification_options(array|bool $user_ids = false, array $options = array())
Find the users who want to receive notifications (helper)
in
base at line 522
protected string|null
mark(bool $unread = true, bool $return = false)
Mark this item read/unread helper
in
base at line 554
protected array
get_authorised_recipients(array $users, int $forum_id, array $options, bool $sort = false)
Get a list of users that are authorised to receive notifications
at line 28
string
get_type()
Get notification type name
in
topic at line 69
set_user_loader(user_loader $user_loader)
No description
in
topic at line 88
static
get_item_id(array $post)
Get the id of the item
in
topic at line 99
static
get_item_parent_id(array $post)
Get the id of the parent
at line 77
array
find_users_for_notification(array $topic, array $options = array())
Find the users who want to receive notifications
in
topic at line 148
string
get_title()
Get the HTML formatted title of this notification
at line 151
string|bool
get_email_template()
Get email template
in
topic at line 206
array
get_email_template_variables()
Get email template variables
at line 120
string
get_url()
Get the url to this item
in
topic at line 246
array
users_to_query()
Users needed to query before this notification can be displayed