public function addAction()
 {
     $form = new Form_Cadmin_MakeAdd();
     if ($this->_request->isPost()) {
         if ($form->isValid($this->_request->getPost())) {
             $makes = new CcmMakes();
             $makes->setCcmMakeName($form->ccm_make_name->getValue());
             $makes->setStatus($form->status->getValue());
             $created_by = $this->_em->find('Users', $this->_userid);
             $makes->setCreatedBy($created_by);
             $makes->setCreatedDate(new \DateTime());
             $makes->setModifiedBy($created_by);
             $makes->setModifiedDate(new \DateTime());
             $this->_em->persist($makes);
             $this->_em->flush();
         }
     }
     $this->_redirect("/cadmin/manage-makes");
 }
예제 #2
0
 public function setStatus($status)
 {
     $this->__load();
     return parent::setStatus($status);
 }