src/Versioned.php
public function deleteFromStage($stage)
    {
        ReadingMode::validateStage($stage);
        $owner = $this->owner;
        static::withVersionedMode(function () use ($stage, $owner) {
            Versioned::set_stage($stage);
            $clone = clone $owner;
            $clone->delete();
        });

        // Fix the version number cache (in case you go delete from stage and then check ExistsOnLive)
        $baseClass = $owner->baseClass();
        self::$cache_versionnumber[$baseClass][$stage][$owner->ID] = null;
    }
public function deleteFromStage($stage)
    {
        ReadingMode::validateStage($stage);
        $owner = $this->owner;
        static::withVersionedMode(function () use ($stage, $owner) {
            Versioned::set_stage($stage);
            $clone = clone $owner;
            $clone->delete();
        });

        // Fix the version number cache (in case you go delete from stage and then check ExistsOnLive)
        $baseClass = $owner->baseClass();
        self::$cache_versionnumber[$baseClass][$stage][$owner->ID] = null;
    }
public function deleteFromStage ( $ stage ) { ReadingMode :: validateStage ( $ stage ) ; $ owner = $ this -> owner ; static :: withVersionedMode ( function ( ) use ( $ stage , $ owner ) { Versioned :: set_stage ( $ stage ) ; $ clone = clone $ owner ; $ clone -> delete ( ) ; } ) ; // Fix the version number cache (in case you go delete from stage and then check ExistsOnLive) $ baseClass = $ owner -> baseClass ( ) ; self :: $ cache_versionnumber [ $ baseClass ] [ $ stage ] [ $ owner -> ID ] = null ; }
Delete this record from the given stage

@param string $stage
Delete this record from the given stage