/** * Delete one or more records * * @return void */ public function removeTask() { // Check for request forgeries Request::checkToken(); // Incoming $ids = Request::getVar('id', array()); $mwdb = Utils::getMWDBO(); if (count($ids) > 0) { $row = new \Components\Tools\Tables\Zones($mwdb); // Loop through each ID foreach ($ids as $id) { if (!$row->delete(intval($id))) { throw new \Exception($row->getError(), 500); } } } App::redirect(Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller, false), Lang::txt('COM_TOOLS_ITEM_DELETED'), 'message'); }