delete() public static method

Delete one or more tags.
public static delete ( mixed $ids )
$ids mixed The ids to delete.
Exemplo n.º 1
0
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     // action to execute
     $action = \SpoonFilter::getGetValue('action', array('delete'), 'delete');
     // no id's provided
     if (!isset($_GET['id'])) {
         $this->redirect(BackendModel::createURLForAction('Index') . '&error=no-selection');
     } else {
         // at least one id
         // redefine id's
         $aIds = (array) $_GET['id'];
         // delete comment(s)
         if ($action == 'delete') {
             BackendTagsModel::delete($aIds);
         }
     }
     // redirect
     $this->redirect(BackendModel::createURLForAction('Index') . '&report=deleted');
 }