\apex\core\controllernotifications

Abstract nofications controller, used as a template for the actual notification controller.

Summary

Methods
Properties
Constants
get_merge_fields()
get_merge_vars()
get_recipient()
$default_code
$display_name
$fields
$senders
$recipients
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$default_code

$default_code :

Type

$display_name

$display_name :

Type

$fields

$fields :

Type

$senders

$senders :

Type

$recipients

$recipients :

Type

Methods

get_merge_fields()

get_merge_fields(): array

Get available merge fields. Used when creating notification via admin panel -- Settings->Notifications menu. This helps populate the select list of available merge fields.

Returns

array —

Associatve array of the available merge fields for this notification controller.

get_merge_vars()

get_merge_vars(integer  $userid,array  $data): array

Get merge variables.

This obtains the necessary merge variables from the database, as you defined within the get_merge_fields() function of this class. These are used to personalize the message for the specific transaction / request.

Parameters

integer $userid

The ID# of the user e-mails are being processed against.

array $data

Any extra data needed.

Returns

array —

An associative array of the merge variables to personalize the e-mail messgae with.

get_recipient()

get_recipient(string  $recipient,integer  $userid,array  $data = array())

Get recipient

Used when the notification controller supports recipients / senders other than the defaults of admin:XX and user. This function takes in the string of the recipient / sender, plus the ID# of the user notifications are being processed against, and returns an array of the full name and e-mail address of recipient / sender.

Parameters

string $recipient

The recipient to obtain.

integer $userid

The user id that e-mails are being processed against.

array $data

Optional array of any necessary data.