public function addAction() { $form = new Form_Cadmin_StatusListAdd(); if ($this->_request->isPost()) { if ($form->isValid($this->_request->getPost())) { $status_lists = new CcmStatusList(); $status_lists->setType($form->type->getValue()); $status_lists->setCcmStatusListName($form->ccm_status_list_name->getValue()); $status_lists->setType($form->type->getValue()); $status_lists->setStatus($form->status->getValue()); $created_by = $this->_em->find('Users', $this->_userid); $status_lists->setCreatedBy($created_by); $status_lists->setCreatedDate(new \DateTime()); $this->_em->persist($status_lists); $this->_em->flush(); } } $this->_redirect("/cadmin/manage-ccm-status-lists?success=1"); }
public function setCreatedBy(\Users $createdBy) { $this->__load(); return parent::setCreatedBy($createdBy); }