Context(Environment env) throws TemplateException { invokingMacroContext = env.getCurrentMacroContext(); List bodyParameterNames = invokingMacroContext.nestedContentParameterNames; if (bodyParameters != null) { for (int i = 0; i < bodyParameters.size(); i++) { Expression exp = (Expression) bodyParameters.get(i); TemplateModel tm = exp.eval(env); if (bodyParameterNames != null && i < bodyParameterNames.size()) { String bodyParameterName = (String) bodyParameterNames.get(i); if (bodyVars == null) { bodyVars = env.new Namespace(); } bodyVars.put(bodyParameterName, tm); } } } }
= lazyImport ? new LazilyInitializedNamespace(templateName) : new Namespace(loadedTemplate); loadedLibs.put(templateName, newNamespace);
Context(Environment env) throws TemplateException { invokingMacroContext = env.getCurrentMacroContext(); List bodyParameterNames = invokingMacroContext.bodyParameterNames; if (bodyParameters != null) { for (int i=0; i<bodyParameters.size(); i++) { Expression exp = (Expression) bodyParameters.get(i); TemplateModel tm = exp.getAsTemplateModel(env); if (bodyParameterNames != null && i < bodyParameterNames.size()) { String bodyParameterName = (String) bodyParameterNames.get(i); if (bodyVars == null) { bodyVars = env.new Namespace(); } bodyVars.put(bodyParameterName, tm); } } } }
= lazyImport ? new LazilyInitializedNamespace(templateName) : new Namespace(loadedTemplate); loadedLibs.put(templateName, newNamespace);
= lazyImport ? new LazilyInitializedNamespace(templateName) : new Namespace(loadedTemplate); loadedLibs.put(templateName, newNamespace);
Namespace newNamespace = new Namespace(loadedTemplate); if (namespace != null) { currentNamespace.put(namespace, newNamespace);
Context(Environment env) throws TemplateException { invokingMacroContext = env.getCurrentMacroContext(); List bodyParameterNames = invokingMacroContext.nestedContentParameterNames; if (bodyParameters != null) { for (int i = 0; i < bodyParameters.size(); i++) { Expression exp = (Expression) bodyParameters.get(i); TemplateModel tm = exp.eval(env); if (bodyParameterNames != null && i < bodyParameterNames.size()) { String bodyParameterName = (String) bodyParameterNames.get(i); if (bodyVars == null) { bodyVars = env.new Namespace(); } bodyVars.put(bodyParameterName, tm); } } } }
Context(Environment env) throws TemplateException { invokingMacroContext = env.getCurrentMacroContext(); List bodyParameterNames = invokingMacroContext.nestedContentParameterNames; if (bodyParameters != null) { for (int i = 0; i < bodyParameters.size(); i++) { Expression exp = (Expression) bodyParameters.get(i); TemplateModel tm = exp.eval(env); if (bodyParameterNames != null && i < bodyParameterNames.size()) { String bodyParameterName = (String) bodyParameterNames.get(i); if (bodyVars == null) { bodyVars = env.new Namespace(); } bodyVars.put(bodyParameterName, tm); } } } }
Context(Environment env, TemplateObject callPlace, List nestedContentParameterNames) { this.localVars = env.new Namespace(); this.callPlace = callPlace; this.nestedContentNamespace = env.getCurrentNamespace(); this.nestedContentParameterNames = nestedContentParameterNames; this.prevLocalContextStack = env.getLocalContextStack(); this.prevMacroContext = env.getCurrentMacroContext(); }
public Environment(Template template, final TemplateHashModel rootDataModel, Writer out) { super(template); configuration = template.getConfiguration(); incompatibleImprovementsGE2328 = configuration.getIncompatibleImprovements().intValue() >= _TemplateAPI.VERSION_INT_2_3_28; this.globalNamespace = new Namespace(null); this.currentNamespace = mainNamespace = new Namespace(template); this.out = out; this.rootDataModel = rootDataModel; importMacros(template); }
Context(Environment env, TemplateElement body, List bodyParameterNames) { this.localVars = env.new Namespace(); this.prevMacroContext = env.getCurrentMacroContext(); this.bodyNamespace = env.getCurrentNamespace(); this.prevLocalContextStack = env.getLocalContextStack(); this.body = body; this.bodyParameterNames = bodyParameterNames; }
public Environment(Template template, final TemplateHashModel rootDataModel, Writer out) { super(template); configuration = template.getConfiguration(); incompatibleImprovementsGE2328 = configuration.getIncompatibleImprovements().intValue() >= _TemplateAPI.VERSION_INT_2_3_28; this.globalNamespace = new Namespace(null); this.currentNamespace = mainNamespace = new Namespace(template); this.out = out; this.rootDataModel = rootDataModel; importMacros(template); }
Context(Environment env, TemplateObject callPlace, List nestedContentParameterNames) { this.localVars = env.new Namespace(); this.callPlace = callPlace; this.nestedContentNamespace = env.getCurrentNamespace(); this.nestedContentParameterNames = nestedContentParameterNames; this.prevLocalContextStack = env.getLocalContextStack(); this.prevMacroContext = env.getCurrentMacroContext(); }
Context(Environment env, TemplateObject callPlace, List nestedContentParameterNames) { this.localVars = env.new Namespace(); this.callPlace = callPlace; this.nestedContentNamespace = env.getCurrentNamespace(); this.nestedContentParameterNames = nestedContentParameterNames; this.prevLocalContextStack = env.getLocalContextStack(); this.prevMacroContext = env.getCurrentMacroContext(); }
public Environment(Template template, final TemplateHashModel rootDataModel, Writer out) { super(template); configuration = template.getConfiguration(); incompatibleImprovementsGE2328 = configuration.getIncompatibleImprovements().intValue() >= _TemplateAPI.VERSION_INT_2_3_28; this.globalNamespace = new Namespace(null); this.currentNamespace = mainNamespace = new Namespace(template); this.out = out; this.rootDataModel = rootDataModel; importMacros(template); }