public function onBeforeDelete() { if (Widget::has_extension('Versioned')) { $currentStage = Versioned::current_stage(); Versioned::reading_stage('Stage'); parent::onBeforeDelete(); Versioned::reading_stage('Live'); parent::onBeforeDelete(); Versioned::reading_stage($currentStage); } else { parent::onBeforeDelete(); } }