Exemplo n.º 1
0
 /**
  * Remove one or more entries
  *
  * @return     void
  */
 public function removeTask()
 {
     // Check for request forgeries
     Request::checkToken();
     // Incoming
     $workshop = Request::getInt('workshop', 0);
     $ids = Request::getVar('rid', array());
     // Get the single ID we're working with
     if (!is_array($ids)) {
         $ids = array();
     }
     // Do we have any IDs?
     if (!empty($ids)) {
         $r = new Respondent(array());
         // Loop through each ID and delete the necessary items
         foreach ($ids as $id) {
             // Remove the profile
             $r->delete($id);
         }
     }
     // Output messsage and redirect
     App::redirect(Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller . '&id[]=' . $workshop, false), Lang::txt('COM_EVENTS_RESPONDENT_REMOVED'));
 }