From fb73cc41eb8f9ef9bf2181f4295dc74581b25b53 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 31 Jul 2012 11:10:41 +0200 Subject: [PATCH] Add filter that can remove single elements from collections. --- .../java/net/pterodactylus/demoscenemusic/core/TemplateServlet.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/net/pterodactylus/demoscenemusic/core/TemplateServlet.java b/src/main/java/net/pterodactylus/demoscenemusic/core/TemplateServlet.java index 0eb9e3e..cfc3fdb 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/core/TemplateServlet.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/core/TemplateServlet.java @@ -60,6 +60,7 @@ import net.pterodactylus.util.template.CollectionSortFilter; import net.pterodactylus.util.template.HtmlFilter; import net.pterodactylus.util.template.MatchFilter; import net.pterodactylus.util.template.ReflectionAccessor; +import net.pterodactylus.util.template.RemoveFilter; import net.pterodactylus.util.template.Template; import net.pterodactylus.util.template.TemplateContextFactory; import net.pterodactylus.util.template.TemplateParser; @@ -129,6 +130,7 @@ public class TemplateServlet extends HttpServlet { templateContextFactory.addFilter("matches", new MatchFilter()); templateContextFactory.addFilter("time", new DurationFilter()); templateContextFactory.addFilter("concise", new ConciseNumberFilter()); + templateContextFactory.addFilter("remove", new RemoveFilter()); templateContextFactory.addTemplateObject("core", core); templateContextFactory.addTemplateObject("dataManager", core.getDataManager()); -- 2.7.4