getId() !== null ? array('monsterCategoryId'=>$monsterCategory->getId(), 'id'=>$monster->getId()) : array('monsterCategoryId'=>$monsterCategory->getId()); return $this->formFactory->create(MonsterType::class, $monster, array( 'action'=>$this->router->generate($route, $params), 'method'=>'post', 'data_route'=>$route, )); } }