/**
  * @param $data
  * @param $form
  * @return bool|SS_HTTPResponse
  */
 public function doDelete($data, $form)
 {
     VersionedReadingMode::setStageReadingMode();
     $value = parent::doDelete($data, $form);
     VersionedReadingMode::restoreOriginalReadingMode();
     return $value;
 }
 /**
  * @param $data
  * @param $form
  * @return bool|SS_HTTPResponse
  */
 public function doDelete($data, $form)
 {
     $currentStage = Versioned::current_stage();
     if ($this->record->isPublished()) {
         $this->unpublish($data, $form);
     }
     Versioned::reading_stage('Stage');
     $action = parent::doDelete($data, $form);
     Versioned::reading_stage($currentStage);
     return $action;
 }