/** * Displays the creation form */ public function newAction() { $data = DataOngkir::find(); $this->view->item = $data; $datas = DataSupir::find(); $this->view->items = $datas; }
/** * Deletes a data_ongkir * * @param string $_id */ public function deleteAction($_id) { $data_ongkir = DataOngkir::findFirst(array(array("kode_daerah" => $_id))); if (!$data_ongkir) { $this->flash->error("data_ongkir was not found"); return $this->dispatcher->forward(array("controller" => "data_ongkir", "action" => "index")); } if (!$data_ongkir->delete()) { foreach ($data_customer->getMessages() as $message) { $this->flash->error($message); } return $this->dispatcher->forward(array("controller" => "data_ongkir", "action" => "search")); } $this->flash->success("data_ongkir was deleted successfully"); return $this->dispatcher->forward(array("controller" => "data_ongkir", "action" => "index")); }