我已经定义了一个带有注释的控制器
@Route("/add,{elId},{elType},{parentId}",name="MeaTask_Add", defaults={"elId"=null,"elType"=null, "parentId"=null})
public function addAction($elId=null, $elType=null, $parentId=null, Request $request){
我尝试像这里一样使用它
$this->generateUrl('MeaTask_Add',array(
'parentId'=>$parentId
))
并得到
An exception has been thrown during the rendering of a template ("Parameter "elType" for route "MeaTask_Add" must match "[^/,]++" ("" given) to generate a corresponding URL.")