delete() public méthode

Purge entries from the log.
public delete ( int[] | string $LogIDs )
$LogIDs int[] | string An array or CSV of log IDs.
 /**
  * Delete spam and optionally delete the users.
  * @param type $LogIDs
  */
 public function deleteSpam($LogIDs)
 {
     $this->permission(array('Garden.Moderation.Manage', 'Moderation.Spam.Manage'), false);
     if (!$this->Request->isPostBack()) {
         throw permissionException('Javascript');
     }
     $LogIDs = explode(',', $LogIDs);
     // Ban the appropriate users.
     $UserIDs = $this->Form->getFormValue('UserID', array());
     if (!is_array($UserIDs)) {
         $UserIDs = array();
     }
     if (!empty($UserIDs)) {
         // Grab the rest of the log entries.
         $OtherLogIDs = $this->LogModel->getWhere(array('Operation' => 'Spam', 'RecordUserID' => $UserIDs));
         $OtherLogIDs = array_column($OtherLogIDs, 'LogID');
         $LogIDs = array_merge($LogIDs, $OtherLogIDs);
         foreach ($UserIDs as $UserID) {
             Gdn::userModel()->ban($UserID, array('Reason' => 'Spam', 'DeleteContent' => true, 'Log' => true));
         }
     }
     // Grab the logs.
     $this->LogModel->delete($LogIDs);
     $this->render('Blank', 'Utility');
 }