/** * The default action - show the home page */ public function indexAction() { if ($this->getRequest()->isPost()) { $this->userService->NewUser($this->_getParam('name'), $this->_getParam('email')); } $rowset = $this->userService->GetAllUsers(); $this->view->users = $rowset->toArray(); }
public function updateAction() { if ($this->getRequest()->isPost()) { $this->userService->SaveUser($this->_getParam('id'), $this->_getParam('name'), $this->_getParam('email'), $this->_getParam('contactType')); $this->_redirect('index'); } else { $this->view->user = $this->userService->GetUser($this->_getParam('id'))->current(); } $this->view->users = $this->userService->GetAllUsers()->toArray(); }
public function adminAction() { //partea de administrare if($this->getRequest()->isPost()) { $this->userService->CreateUser($this->_getParam('nume'),$this->_getParam('email')); } $rowset = $this->userService->GetAllUsers(); $this->view->users = $rowset->toArray(); }