public function updateAction() { if ($this->getRequest()->isPost()) { $this->userService->SaveUser($this->_getParam('id'), $this->_getParam('name'), $this->_getParam('email')); $this->_redirect('index'); } else { $this->view->user = $this->userService->GetUser($this->_getParam('id'))->current(); } }
public function associateAction() { $tasks = $this->userService->GetAllTasks(); $this->view->user = $this->userService->GetUser($this->_getParam('id')); $this->view->form = new App_forms_Associate($this->view->user, $tasks); if ($this->getRequest()->isPost() && $this->view->form->isValid($this->getRequest()->getParams())) { $this->view->form->persistData(); } }