我在管理类中有configureShowField
。如何将变量从管理控制器传递到树枝模板?
->add('places', 'string', array('template'
=>'SonataAdminBundle:CRUD:list_places.html.twig', 'places_array' => $some_array)
答案 0 :(得分:1)
也许这会有所帮助:
return $this->render(
'SonataAdminBundle:CRUD:list_places.html.twig',
array(
'configureShowField' => $configureShowField
)
);