Created
May 28, 2013 13:27
-
-
Save oaltman/5662751 to your computer and use it in GitHub Desktop.
NewAction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @Route("/{room}/new", name="model_new") | |
* @Template() | |
*/ | |
public function newAction(Request $request,$room) | |
{ | |
$form = $this->createForm(new RoomModelType(), new RoomModel()); | |
if($request->isMethod('POST')) | |
{ | |
// ulozeni do DB | |
} | |
return array( | |
'form' => $form->createView() | |
, 'url' => $this->generateUrl('model_new',array('room' => $room)) | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment