Tag filter concept

6 views
Skip to first unread message

Alexander Obuhovich

unread,
Dec 5, 2012, 8:46:37 AM12/5/12
to Development In-Portal
I was looking at Twig template parser, used in Symfony, recently and found interesting filter approach used in there.

In Twig filter is after-processing applied to tag result. Basically all our:
  • escaping
  • comparing
  • tab removal
is done there as filters. However that concept goes far beyond that - each Twig plugin can define it's own filter, that can be used with ANY OTHER tag from any other module.

Also it's easily provides ability add block tags per module.


I also recommend digging deeper into Twig code to find more ways to organize cross-module communication, e.g. shared tags, shared events.

Dmitry A.

unread,
Dec 24, 2012, 1:07:23 AM12/24/12
to in-por...@googlegroups.com
Hi Alex,


Thank you for your research and report on this.

I do agree we should continue reviewing this since it can bring more benefits to our parser too.


DA
Reply all
Reply to author
Forward
0 new messages