public class SetHelper extends BasicSectionHelper
WithHelper except the current
HelperDefinition.getHash() map is pushed on the context stack.
{{#set foo="hello"}}
{{foo}}
{{/set}}
{{#set foo="Hello" myName=person.name}}
{{foo}} {{myName}}!
{{/set}}
SECTION_TYPESHELPER_TAG_TYPES| Constructor and Description |
|---|
SetHelper() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(Options options)
Execute the helper.
|
protected int |
numberOfRequiredParameters() |
void |
validate(HelperDefinition definition)
Helper should validate the tag definition (e.g. number of parameters)
during compilation and fail fast if necessary.
|
allowedTagTypesnumberOfRequiredHashEntriesappend, getHashValue, init, isSection, isUnescapeVariable, isVariablegetConfigurationKeys, checkNotInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConfigurationKeyspublic void execute(Options options)
Helperpublic void validate(HelperDefinition definition)
HelperMustacheException with code
MustacheProblem.COMPILE_HELPER_VALIDATION_FAILURE should be
thrown in case of validation failure occurs.validate in interface Helpervalidate in class BasicHelperprotected int numberOfRequiredParameters()
numberOfRequiredParameters in class BasicHelperCopyright © 2014. All Rights Reserved.