/** * Action for Editing a Commenter */ public function editAction() { $params = $this->getRequest()->getParams(); if (!isset($params['commenter'])) { throw new InvalidArgumentException(); } $commenter = $this->commenterRepository->find($params['commenter']); if ($commenter) { $this->form->setFromEntity($commenter); $this->handleForm($this->form, $commenter); $this->view->form = $this->form; $this->view->commenter = $commenter; } }