/** * Deletes a data_customer * * @param string $_id */ public function deleteAction($_id) { $data_customer = DataCustomer::findFirstBy_id($_id); if (!$data_customer) { $this->flash->error("data_customer was not found"); return $this->dispatcher->forward(array("controller" => "data_customer", "action" => "index")); } if (!$data_customer->delete()) { foreach ($data_customer->getMessages() as $message) { $this->flash->error($message); } return $this->dispatcher->forward(array("controller" => "data_customer", "action" => "search")); } $this->flash->success("data_customer was deleted successfully"); return $this->dispatcher->forward(array("controller" => "data_customer", "action" => "index")); }
public function createpdfAction() { $getdata = DataCustomer::find(); $this->view->datas = $getdata; }