create edit page

This commit is contained in:
2013-11-06 19:19:02 +01:00
parent b89c5e3de4
commit d366a76567
4 changed files with 84 additions and 0 deletions

View File

@@ -21,6 +21,20 @@ class PersonController extends Controller {
}
public function editAction($id) {
$person = $this->_getPerson($id);
if ($person === null) {
$this->createNotFoundException();
}
$form = $this->createForm(new \CL\Chill\PersonBundle\Form\PersonType(), $person);
return $this->render('CLChillPersonBundle:Person:edit.html.twig',
array('person' => $person,
'form' => $form->createView()));
}
public function searchAction() {
$q = $this->getRequest()->query->getAlnum('q', '');
$q = trim($q);