Properties

$templates

$templates : array

Array of templates.

Used to cache templates after they were first requested.

Type

array — Array of templates used for caching.

Methods

get_template()

get_template(string  $template_name) : \O3PO_ShortcodeTemplate

Get a template by name.

Parameters

string $template_name

The name of the template.

Returns

\O3PO_ShortcodeTemplate

The requested template.

expand()

expand(string  $template_name, array  $replacements, boolean  $error_if_not_all_appearing_specified = true) : string

Expand a email template and return the resulting text.

Parameters

string $template_name

The name of the template.

array $replacements

Array of replacements for all or a subset of the shotcodes in the template.

boolean $error_if_not_all_appearing_specified

Whether to throw an exception in case not for all shortcodes appearing in the template replacements are specified.

Returns

string —

Expanded template with shortcodes replaced by replacements.

render_short_codes()

render_short_codes(string  $template_name) : string

Render the short codes for a specific template to an HTML list.

Parameters

string $template_name

The name of the O3PO_EmailTemplates class method.

Returns

string —

An HTML list of the short codes.

render_email_settings()

render_email_settings() 

Render the head of the email settings.

render_executive_board_setting()

render_executive_board_setting() 

Render the executive board of the email settings

render_editor_in_chief_setting()

render_editor_in_chief_setting() 

Render the editor in chief of the email settings

render_self_notification_subject_template_settings()

render_self_notification_subject_template_settings() 

Render the email template for the self notification subject

render_self_notification_body_template_settings()

render_self_notification_body_template_settings() 

Render the email template for the self notification body

render_author_notification_subject_template_settings()

render_author_notification_subject_template_settings() 

Render the email template for the author notification subject

render_author_notification_body_template_settings()

render_author_notification_body_template_settings() 

Render the email template for the author notification body

render_author_notification_secondary_subject_template_settings()

render_author_notification_secondary_subject_template_settings() 

Render the email template for the author notification secondary subject

render_author_notification_secondary_body_template_settings()

render_author_notification_secondary_body_template_settings() 

Render the email template for the author notification secondary body

render_fermats_library_notification_subject_template_settings()

render_fermats_library_notification_subject_template_settings() 

Render the email template for the fermats library notification subject

render_fermats_library_notification_body_template_settings()

render_fermats_library_notification_body_template_settings() 

Render the email template for the fermats library notification body

specify_settings()

specify_settings(\O3PO_Settings  $settings) 

Specifies class specific settings sections and fields.

To be called from O3PO_Settings::configure().

Parameters

\O3PO_Settings $settings

Settings object.