O3PO_EmailTemplates
in package
implements
O3PO_SettingsSpecifyer
Class representing the email templates
Tags
Table of Contents
Interfaces
- O3PO_SettingsSpecifyer
- Interface for classes specifying settings.
Properties
- $templates : array<string|int, mixed>
- Array of templates.
Methods
- expand() : string
- Expand a email template and return the resulting text.
- get_template() : O3PO_ShortcodeTemplate
- Get a template by name.
- render_author_notification_body_template_settings() : mixed
- Render the email template for the author notification body
- render_author_notification_secondary_body_template_settings() : mixed
- Render the email template for the author notification secondary body
- render_author_notification_secondary_subject_template_settings() : mixed
- Render the email template for the author notification secondary subject
- render_author_notification_subject_template_settings() : mixed
- Render the email template for the author notification subject
- render_editor_in_chief_setting() : mixed
- Render the editor in chief of the email settings
- render_email_settings() : mixed
- Render the head of the email settings.
- render_executive_board_setting() : mixed
- Render the executive board of the email settings
- render_fermats_library_notification_body_template_settings() : mixed
- Render the email template for the fermats library notification body
- render_fermats_library_notification_subject_template_settings() : mixed
- Render the email template for the fermats library notification subject
- render_self_notification_body_template_settings() : mixed
- Render the email template for the self notification body
- render_self_notification_subject_template_settings() : mixed
- Render the email template for the self notification subject
- render_short_codes() : string
- Render the short codes for a specific template to an HTML list.
- specify_settings() : mixed
- Specifies class specific settings sections and fields.
Properties
$templates
Array of templates.
private
static array<string|int, mixed>
$templates
= array()
Used to cache templates after they were first requested.
Array of templates used for caching.
Tags
Methods
expand()
Expand a email template and return the resulting text.
public
static expand(string $template_name, array<string|int, mixed> $replacements[, bool $error_if_not_all_appearing_specified = true ]) : string
Parameters
- $template_name : string
-
The name of the template.
- $replacements : array<string|int, mixed>
-
Array of replacements for all or a subset of the shotcodes in the template.
- $error_if_not_all_appearing_specified : bool = true
-
Whether to throw an exception in case not for all shortcodes appearing in the template replacements are specified.
Tags
Return values
string —Expanded template with shortcodes replaced by replacements.
get_template()
Get a template by name.
public
static get_template(string $template_name) : O3PO_ShortcodeTemplate
Parameters
- $template_name : string
-
The name of the template.
Tags
Return values
O3PO_ShortcodeTemplate —The requested template.
render_author_notification_body_template_settings()
Render the email template for the author notification body
public
static render_author_notification_body_template_settings() : mixed
Tags
render_author_notification_secondary_body_template_settings()
Render the email template for the author notification secondary body
public
static render_author_notification_secondary_body_template_settings() : mixed
Tags
render_author_notification_secondary_subject_template_settings()
Render the email template for the author notification secondary subject
public
static render_author_notification_secondary_subject_template_settings() : mixed
Tags
render_author_notification_subject_template_settings()
Render the email template for the author notification subject
public
static render_author_notification_subject_template_settings() : mixed
Tags
render_editor_in_chief_setting()
Render the editor in chief of the email settings
public
static render_editor_in_chief_setting() : mixed
Tags
render_email_settings()
Render the head of the email settings.
public
static render_email_settings() : mixed
Tags
render_executive_board_setting()
Render the executive board of the email settings
public
static render_executive_board_setting() : mixed
Tags
render_fermats_library_notification_body_template_settings()
Render the email template for the fermats library notification body
public
static render_fermats_library_notification_body_template_settings() : mixed
Tags
render_fermats_library_notification_subject_template_settings()
Render the email template for the fermats library notification subject
public
static render_fermats_library_notification_subject_template_settings() : mixed
Tags
render_self_notification_body_template_settings()
Render the email template for the self notification body
public
static render_self_notification_body_template_settings() : mixed
Tags
render_self_notification_subject_template_settings()
Render the email template for the self notification subject
public
static render_self_notification_subject_template_settings() : mixed
Tags
render_short_codes()
Render the short codes for a specific template to an HTML list.
public
static render_short_codes(string $template_name) : string
Parameters
- $template_name : string
-
The name of the O3PO_EmailTemplates class method.
Tags
Return values
string —An HTML list of the short codes.
specify_settings()
Specifies class specific settings sections and fields.
public
static specify_settings(O3PO_Settings $settings) : mixed
To be called from O3PO_Settings::configure().
Parameters
- $settings : O3PO_Settings
-
Settings object.