boolean (TemplateImpl template, Set<? extends TemplateContextType> contextTypes) { for (TemplateContextType type : contextTypes) { if (template.getTemplateContext().isEnabled(type)) { return true; } } return false; }