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
public interface HelperPlugin<T> extends Plugin
Plugin that allows to register custom HandlebarsHelper
extensions that can be used in all templates. The name of the plugin is used as helper name for registering in Handlebars.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
apply(T context, com.github.jknack.handlebars.Options options, HelperContext pluginContext)
Apply the helper to the context.
-
-
-
Method Detail
-
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.
-
-