i've looked for this subject but couldnt find anything on the internet.
I wrote an "bbcode" extentions in twig and i want to use it within php / controller as well.
how do i do that?
thanks in advance.
Last edited by mazaka; 03-28-2012 at 10:30 PM.
i want to re-use the extention within a controller because i want to send a ajax-request to the server with a bbcode-string and the server should return the html-code back. But i didn't really want to create an extra twig-file to convert the bbcode in order to return the html-code. I think i dont have another choice.
That actually seams to be the right way to do it..
If you really don't like that solution you may reorganize your code in the twig extension you make just call the twig extension function from your controller.