class report_post_closed extends post
Post report closed notifications class This class handles notifications for when reports are closed on posts (for the one who reported the post)
Properties
static bool|array | $notification_option | Notification option data (for outputting to the user) |
string | $email_template | Email template to use to send notifications |
Methods
__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 |
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 |
create_insert_array($post, array $pre_create_data = array())
Function for preparing the data for insertion in an SQL query |
||
array |
get_insert_array()
Function for getting the data for insertion in an SQL query |
|
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 post |
array |
prepare_for_display()
Prepare to output the notification to the template |
from base |
false |
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 |
|
string |
get_reference()
Get the HTML formatted reference of the notification |
|
string |
get_forum()
Get the forum of the notification reference (fall back) |
from base |
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 post |
string |
get_type()
Get notification type name |
|
set_config(config $config)
|
from post | |
set_user_loader(user_loader $user_loader)
|
from post | |
static int |
get_item_id(array $post)
Get the id of the item |
from post |
static int |
get_item_parent_id(array $post)
Get the id of the parent |
from post |
array |
find_users_for_notification(array $post, array $options = array())
Find the users who want to receive notifications |
|
string |
get_title()
Get the HTML formatted title of this notification |
|
string|bool |
get_email_template()
Get email template |
|
array |
get_email_template_variables()
Get email template variables |
|
string |
get_url()
Get the url to this item |
|
array |
users_to_query()
Users needed to query before this notification can be displayed |
|
array |
trim_user_ary(array $users)
Trim the user array passed down to 3 users if the array contains more than 4 users. |
from post |
array |
add_responders(mixed $post)
Add responders to the notification |
from post |
Details
in base at line 87
public
__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
public
set_notification_manager(manager $notification_manager)
Set notification manager (required)
in base at line 117
public
set_initial_data(array $data = array())
Set initial data from the database
in base at line 130
public mixed
__get(mixed $name)
Magic method to get data from this notification
in base at line 144
public null
__set(mixed $name, mixed $value)
Magic method to set data on this notification
in base at line 157
public mixed
__toString()
Magic method to get a string of this notification
Primarily for testing
at line 156
public
create_insert_array($post, array $pre_create_data = array())
Function for preparing the data for insertion in an SQL query
at line 168
public array
get_insert_array()
Function for getting the data for insertion in an SQL query
in base at line 222
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 244
public string|null
mark_read(bool $return = false)
Mark this item read
in base at line 255
public string|null
mark_unread(bool $return = false)
Mark this item unread
in post at line 303
public string
get_redirect_url()
{inheritDoc}
in base at line 273
public array
prepare_for_display()
Prepare to output the notification to the template
in base at line 313
public false
get_unsubscribe_url(string|bool $method = false)
URL to unsubscribe to this notification (fall back)
in base at line 323
public string
get_style_class()
Get the CSS style class of the notification (fall back)
at line 138
public string
get_avatar()
Get the user's avatar
at line 127
public string
get_reference()
Get the HTML formatted reference of the notification
in base at line 353
public string
get_forum()
Get the forum of the notification reference (fall back)
in base at line 363
public string
get_reason()
Get the reason for the notifcation (fall back)
in base at line 373
public array
get_load_special()
Get the special items to load (fall back)
in base at line 384
public
load_special(array $data, array $notifications)
Load the special items (fall back)
at line 54
public bool
is_available()
Is available
in post at line 358
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 post at line 64
public
set_config(config $config)
in post at line 69
public
set_user_loader(user_loader $user_loader)
in post at line 88
static public int
get_item_id(array $post)
Get the id of the item
in post at line 99
static public int
get_item_parent_id(array $post)
Get the id of the parent
at line 67
public array
find_users_for_notification(array $post, array $options = array())
Find the users who want to receive notifications
at line 112
public string
get_title()
Get the HTML formatted title of this notification
at line 82
public string|bool
get_email_template()
Get email template
at line 92
public array
get_email_template_variables()
Get email template variables
at line 102
public string
get_url()
Get the url to this item
at line 148
public array
users_to_query()
Users needed to query before this notification can be displayed
in post at line 338
public array
trim_user_ary(array $users)
Trim the user array passed down to 3 users if the array contains more than 4 users.
in post at line 414
public array
add_responders(mixed $post)
Add responders to the notification