PHP Class phpbb\notification\type\pm

Inheritance: extends phpbb\notification\type\base
Show file Open project: phpbb/phpbb Class Usage Examples

Public Properties

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

Public Methods

Method Description
create_insert_array ( array $pm, 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 $pm, 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_item_id ( array $pm ) Get the id of the
get_item_parent_id ( array $pm ) 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
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 $pm, array $pre_create_data = [] ) : array
$pm 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 $pm, array $options = [] ) : array
$pm array Data from submit_pm
$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_item_id() public static method

Get the id of the
public static get_item_id ( array $pm )
$pm array The data from the private message

get_item_parent_id() public static method

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

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 ( )

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

$notification_option public static property

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