我使用的Symfony PHP MVC框架。我使用JSON传递一个Ajax响应,我需要一个动作的HTML模板要传递的价值观之一。难道Symfony的有沿renderTemplateToString的线路()的方法?
I use the Symfony PHP MVC framework. I'm using JSON to pass an AJAX response, and I need an action's template HTML to be one of the values passed. Does Symfony have a method along the lines of renderTemplateToString() ?
即使对于那些不熟悉的Symfony,有一个明显的方式做到这一点?
Even for those unfamiliar with Symfony, is there an obvious way to do this?
使用的 sfAction :: getPartial()
和的 getComponent()
。