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
static bool|array | $notification_option | Notification option data (for outputting to the user) |
Methods
base |
__construct(user_loader $user_loader, driver_interface $db, driver_interface $cache, user $user, auth $auth, config $config, string $phpbb_root_path, string $php_ext, string $notification_types_table, string $notifications_table, string $user_notifications_table)
Notification Type Base Constructor |
from base |
set_notification_manager(manager $notification_manager)
Set notification manager (required) |
from base | |
set_initial_data(array $data = array())
Set initial data from the database |
from base | |
mixed |
__get(mixed $name)
Magic method to get data from this notification |
from base |
null |
__set(mixed $name, mixed $value)
Magic method to set data on this notification |
from base |
mixed |
__toString()
Magic method to get a string of this notification |
from base |
array |
create_insert_array(array $topic, array $pre_create_data = array())
Function for preparing the data for insertion in an SQL query (The service handles insertion) |
|
array |
create_update_array(array $type_data)
Function for preparing the data for update in an SQL query (The service handles insertion) |
from base |
string|null |
mark_read(bool $return = false)
Mark this item read |
from base |
string|null |
mark_unread(bool $return = false)
Mark this item unread |
from base |
string |
get_redirect_url()
{inheritDoc} |
from base |
array |
prepare_for_display()
Prepare to output the notification to the template |
from base |
get_unsubscribe_url(string|bool $method = false)
URL to unsubscribe to this notification (fall back) |
from base | |
string |
get_style_class()
Get the CSS style class of the notification (fall back) |
from base |
string |
get_avatar()
Get the user's avatar |
from topic |
string |
get_reference()
Get the HTML formatted reference of the notification |
from topic |
string |
get_forum()
Get the forum of the notification reference |
from topic |
string |
get_reason()
Get the reason for the notifcation (fall back) |
from base |
array |
get_load_special()
Get the special items to load (fall back) |
from base |
load_special(array $data, array $notifications)
Load the special items (fall back) |
from base | |
bool |
is_available()
Is available |
|
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 createinsertarray() is run. |
from topic |
string |
get_type()
Get notification type name |
|
static |
get_item_id(array $post)
Get the id of the item |
from topic |
static |
get_item_parent_id(array $post)
Get the id of the parent |
from topic |
array |
find_users_for_notification(array $topic, array $options = array())
Find the users who want to receive notifications |
|
string |
get_title()
Get the HTML formatted title of this notification |
from topic |
string|bool |
get_email_template()
Get email template |
|
array |
get_email_template_variables()
Get email template variables |
from topic |
string |
get_url()
Get the url to this item |
|
array |
users_to_query()
Users needed to query before this notification can be displayed |
from topic |
Details
in base at line 107
public base
__construct(user_loader $user_loader, driver_interface $db, driver_interface $cache, user $user, auth $auth, config $config, string $phpbb_root_path, string $php_ext, string $notification_types_table, string $notifications_table, string $user_notifications_table)
Notification Type Base Constructor
in base at line 129
public
set_notification_manager(manager $notification_manager)
Set notification manager (required)
in base at line 141
public
set_initial_data(array $data = array())
Set initial data from the database
in base at line 154
public mixed
__get(mixed $name)
Magic method to get data from this notification
in base at line 168
public null
__set(mixed $name, mixed $value)
Magic method to set data on this notification
in base at line 181
public mixed
__toString()
Magic method to get a string of this notification
Primarily for testing
at line 134
public array
create_insert_array(array $topic, array $pre_create_data = array())
Function for preparing the data for insertion in an SQL query (The service handles insertion)
in base at line 245
public 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 266
public string|null
mark_read(bool $return = false)
Mark this item read
in base at line 277
public string|null
mark_unread(bool $return = false)
Mark this item unread
in base at line 285
public string
get_redirect_url()
{inheritDoc}
in base at line 295
public array
prepare_for_display()
Prepare to output the notification to the template
in base at line 334
public
get_unsubscribe_url(string|bool $method = false)
URL to unsubscribe to this notification (fall back)
in base at line 344
public string
get_style_class()
Get the CSS style class of the notification (fall back)
in topic at line 120
public string
get_avatar()
Get the user's avatar
in topic at line 152
public string
get_reference()
Get the HTML formatted reference of the notification
in topic at line 165
public string
get_forum()
Get the forum of the notification reference
in base at line 384
public string
get_reason()
Get the reason for the notifcation (fall back)
in base at line 394
public array
get_load_special()
Get the special items to load (fall back)
in base at line 402
public
load_special(array $data, array $notifications)
Load the special items (fall back)
at line 62
public bool
is_available()
Is available
in topic at line 244
public 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 createinsertarray() is run.
The data returned from this function will be sent to createinsertarray().
at line 28
public string
get_type()
Get notification type name
in topic at line 71
static public
get_item_id(array $post)
Get the id of the item
in topic at line 81
static public
get_item_parent_id(array $post)
Get the id of the parent
at line 77
public array
find_users_for_notification(array $topic, array $options = array())
Find the users who want to receive notifications
in topic at line 130
public string
get_title()
Get the HTML formatted title of this notification
at line 148
public string|bool
get_email_template()
Get email template
in topic at line 188
public array
get_email_template_variables()
Get email template variables
at line 120
public string
get_url()
Get the url to this item
in topic at line 228
public array
users_to_query()
Users needed to query before this notification can be displayed