Interface HelperPlugin<T>
- Type Parameters:
T- Context type for helper
- All Superinterfaces:
Plugin
- All Known Implementing Classes:
ContainsHelper,DisallowPropertyHelper,EachIfEqualsHelper,EachIfHelper,EnsurePropertiesHelper,IfEqualsHelper,IfNotEqualsHelper,RegexQuoteHelper
Plugin that allows to register custom Handlebars
Helper extensions that can be used in all templates.
The name of the plugin is used as helper name for registering in Handlebars.-
Method Summary
Modifier and TypeMethodDescriptionapply(T context, com.github.jknack.handlebars.Options options, HelperContext pluginContext) Apply the helper to the context.
-
Method Details
-
apply
Object apply(T context, com.github.jknack.handlebars.Options options, HelperContext pluginContext) throws IOException Apply the helper to the context.- Parameters:
context- The context object.options- The options object.pluginContext- Plugin context- Returns:
- A string result.
- Throws:
IOException- If a template cannot be loaded.
-