ZenMagick 0.9.10


org.zenmagick.mvc.services.misc\ZMEmails
mvc\services\misc\ZMEmails.php at line 36

Class ZMEmails

ZMObject
└─ZMEmails

public class ZMEmails
extends ZMObject

Useful stuff to create email contents.

The code in this service assumes that email templates are located in a separate emails template folder.

The view used to resolve template names and create content is accquired via ZMUrlManager::instance()->findView(null, 'emails'), so if you need special settings, etc. it is possible to configure that via the regular url mappings.

Author:
DerManoMann

Fields inherited from org.zenmagick.core\ZMObject
properties_
Method Summary
void

__construct()

Create new instance.

strintg

createContents(string template, boolean html, mixed request, array context)

Generate the contents for the given template and parameters.

array

getFormatsForTemplate(string template, mixed request)

Get available formats.

static void

instance()

Get instance.

Methods inherited from org.zenmagick.core\ZMObject
__construct, attachMethod, get, getAttachedMethods, getProperties, getPropertyNames, set, singleton

Method Detail

mvc\services\misc\ZMEmails.php at line 41

__construct

public void __construct()

Create new instance.


mvc\services\misc\ZMEmails.php at line 94

createContents

public strintg createContents(string template, boolean html, mixed request, array context)

Generate the contents for the given template and parameters.

If HTML is requested but not available, text will be returned.

Parameters:
template - The template name.
html - Indicate whether to create HTML or text content; default is false.
context - Optional context parameter; default is an empty array.
Request:
ZMRequest request The current request.
Returns:
The content.

mvc\services\misc\ZMEmails.php at line 67

getFormatsForTemplate

public array getFormatsForTemplate(string template, mixed request)

Get available formats.

Parameters:
template - The template name.
Request:
ZMRequest request The current request.
Returns:
List of available formats.

mvc\services\misc\ZMEmails.php at line 55

instance

public static void instance()

Get instance.


ZenMagick 0.9.10