public function addNewTypeAction() { // action body $type = new Category(); $typeRepo = MyEntityManagerFactory::getEntityManager()->getRepository('\\Models\\Entities\\Category'); // $type->setTypeName($this->getRequest()->getPost('type')); $type->setName($this->getRequest()->getPost('type')); $type->setDescription($this->getRequest()->getPost('description')); $type->setSortingOrder($this->getRequest()->getPost('sortingOrder')); $currentDate = new DateTime(); $type->setCreatedDate($currentDate); $type->setIsActive(true); $typeRepo->save($type); Zend_Debug::dump($type); // Die(); $url = '/manage/types'; $this->redirect($url); //$this->forward("servers","manage"); }