4
我试图将$this->render()
结果赋值给一个方法(此方法呈现Google地图的infoWindow/baloon)。将模板渲染结果传递给另一个方法
我使用的方法,这样创建这个信息窗口:
$infoWindow->setContent(<here goes the template>);
,但通过这样的:
$infoWindow->setContent($this->render('WmapFrontBundle:Place:infoWindow.html.twig'));
不会在所有的工作。将模板分配给变量或将其内容传递给方法的正确方法是什么?
就是这样!谢谢你的帮助 :) – mbajur