ZMObject
└─ZMEmails
public class ZMEmails
extends ZMObject
| Fields inherited from org.zenmagick.core\ZMObject | |
|---|---|
| properties_ | |
| Method Summary | |
|---|---|
| void | 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 | |
public void __construct()
Create new instance.
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.
false.public array getFormatsForTemplate(string template, mixed request)
Get available formats.
public static void instance()
Get instance.
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.