/** * Delete one or more entries * * @return void */ public function removeTask() { // Check for request forgeries Request::checkToken(); // Incoming $ids = Request::getVar('id', array()); $ids = !is_array($ids) ? array($ids) : $ids; if (count($ids) > 0) { // Loop through all the IDs foreach ($ids as $id) { $entry = new Item(intval($id)); // Delete the entry if (!$entry->delete()) { \Notify::error($entry->getError()); } } } // Set the redirect App::redirect(Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller, false), Lang::txt('COM_COLLECTIONS_ITEMS_DELETED')); }