PHP Class phpbb\notification\type\topic

Inheritance: extends phpbb\notification\type\base
Datei anzeigen Open project: phpbb/phpbb Class Usage Examples

Public Properties

Property Type Description
$notification_option Notification option data (for outputting to the user)

Protected Properties

Property Type Description
$inherit_read_status boolean Inherit notification read status from topic.
$language_key string Language key used to output the text

Public Methods

Method Description
create_insert_array ( array $post, array $pre_create_data = [] ) : array Function for preparing the data for insertion in an SQL query (The service handles insertion)
find_users_for_notification ( array $topic, array $options = [] ) : array Find the users who want to receive notifications
get_avatar ( ) Get the user's avatar
get_email_template ( ) : string | boolean Get email template
get_email_template_variables ( ) : array Get email template variables
get_forum ( ) : string Get the forum of the notification reference
get_item_id ( array $post ) Get the id of the item
get_item_parent_id ( array $post ) Get the id of the parent
get_reference ( ) : string Get the HTML formatted reference of the notification
get_title ( ) : string Get the HTML formatted title of this notification
get_type ( ) : string Get notification type name
get_url ( ) : string Get the url to this item
is_available ( ) Is available
pre_create_insert_array ( array $post, array $notify_users ) : array 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().
users_to_query ( ) : array Users needed to query before this notification can be displayed

Method Details

create_insert_array() public method

Function for preparing the data for insertion in an SQL query (The service handles insertion)
public create_insert_array ( array $post, array $pre_create_data = [] ) : array
$post array Data from submit_post
$pre_create_data array Data from pre_create_insert_array()
return array Array of data ready to be inserted into the database

find_users_for_notification() public method

Find the users who want to receive notifications
public find_users_for_notification ( array $topic, array $options = [] ) : array
$topic array Data from the topic
$options array Options for finding users for notification
return array

get_avatar() public method

Get the user's avatar
public get_avatar ( )

get_email_template() public method

Get email template
public get_email_template ( ) : string | boolean
return string | boolean

get_email_template_variables() public method

Get email template variables

get_forum() public method

Get the forum of the notification reference
public get_forum ( ) : string
return string

get_item_id() public static method

Get the id of the item
public static get_item_id ( array $post )
$post array The data from the post

get_item_parent_id() public static method

Get the id of the parent
public static get_item_parent_id ( array $post )
$post array The data from the post

get_reference() public method

Get the HTML formatted reference of the notification
public get_reference ( ) : string
return string

get_title() public method

Get the HTML formatted title of this notification
public get_title ( ) : string
return string

get_type() public method

Get notification type name
public get_type ( ) : string
return string

get_url() public method

Get the url to this item
public get_url ( ) : string
return string URL

is_available() public method

Is available
public is_available ( )

pre_create_insert_array() public method

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().
public pre_create_insert_array ( array $post, array $notify_users ) : array
$post array Post data from submit_post
$notify_users array Notify users list Formated from find_users_for_notification()
return array Whatever you want to send to create_insert_array().

users_to_query() public method

Users needed to query before this notification can be displayed
public users_to_query ( ) : array
return array Array of user_ids

Property Details

$inherit_read_status protected_oe property

Inherit notification read status from topic.
protected bool $inherit_read_status
return boolean

$language_key protected_oe property

Language key used to output the text
protected string $language_key
return string

$notification_option public_oe static_oe property

Notification option data (for outputting to the user)
public static $notification_option