public class TemplateEnginePebble extends Object implements TemplateEngine
| Constructor and Description |
|---|
TemplateEnginePebble() |
| Modifier and Type | Method and Description |
|---|---|
String |
getTemplateName(String templateName)
Checks if a given template name has the current suffix and sets is
if it does not exist
|
String |
render(Flash flash,
Session session,
Form form,
Messages messages,
String templatePath,
Map<String,Object> content)
Renders a template for a specific controller class and method
|
String |
render(String pathPrefix,
String templateName,
Map<String,Object> content)
Renders a template for a specific controller class and method
|
String |
renderException(io.undertow.server.HttpServerExchange exchange,
Throwable cause,
boolean templateException)
When in dev mode, this method is used to pass the framework exception to the frontend
|
public String render(Flash flash, Session session, Form form, Messages messages, String templatePath, Map<String,Object> content) throws MangooTemplateEngineException
TemplateEnginerender in interface TemplateEngineflash - The current flashsession - The current sessionform - The current Formmessages - The current messagestemplatePath - The path to the template to rendercontent - The content map which is passed to the templateMangooTemplateEngineException - MangooTemplateEngineExceptionpublic String render(String pathPrefix, String templateName, Map<String,Object> content) throws MangooTemplateEngineException
TemplateEnginerender in interface TemplateEnginepathPrefix - A path prefix for the templatetemplateName - The path to the template to rendercontent - The content map which is passed to the templateMangooTemplateEngineException - MangooTemplateEngineExceptionpublic String renderException(io.undertow.server.HttpServerExchange exchange, Throwable cause, boolean templateException) throws MangooTemplateEngineException
TemplateEnginerenderException in interface TemplateEngineexchange - A HttpServerExchange instancecause - The throwable causetemplateException - True if the exceptions occurs during exception rendering, false otherwiseMangooTemplateEngineException - MangooTemplateEngineExceptionpublic String getTemplateName(String templateName)
TemplateEnginegetTemplateName in interface TemplateEnginetemplateName - The name of the template fileCopyright © 2016. All rights reserved.