public function addAction() { $form = new Form_Cadmin_List(); if ($this->_request->isPost()) { if ($form->isValid($this->_request->getPost())) { $listValue = new ListDetail(); $master_id = $this->_em->find('ListMaster', $form->list_master->getValue()); $listValue->setListMaster($master_id); $listValue->setListValue($form->list_value->getValue()); $listValue->setDescription($form->description->getValue()); $user_id = $this->_em->find('Users', $this->_userid); $listValue->setCreatedBy($user_id); $listValue->setCreatedDate(new \DateTime()); $this->_em->persist($listValue); $this->_em->flush(); } } $this->_redirect("/cadmin/manage-lists"); }
public function setListMaster(\ListMaster $listMaster) { $this->__load(); return parent::setListMaster($listMaster); }