0
使用单一的调用方式操作在控制器:我怎么能在树枝
$entity = new Goods();
$form = $this->createForm(new GoodsType(), $entity, array(
'action' => $this->generateUrl('shop_goods_create'),
'method' => 'POST',
));
$form->add('submit', 'submit', array('label' => 'Create'));
return $this->render('ShopAdminBundle:Goods:new.html.twig', array(
'entity' => $entity,
'form' => $form->createView(),
));
在View: 我想获得操作URL。这就像表格形式(form.action),我知道这是不对的,希望谁可以告诉我一个正确的方法
好吧,我只是想知道是否$这个 - >的CreateForm()调用表单模板(form.action)方法类似。但是Thx〜 – 2014-09-01 09:20:01