src/Extensions/GridFieldBetterButtonsItemRequest.php
public function recordIsDeletedFromStage()
    {
        // for SiteTree records
        if ($this->owner->hasMethod('getIsDeletedFromStage')) {
            return $this->owner->IsDeletedFromStage;
        }

        if (!$this->owner->record->checkVersioned()) {
            return false;
        }

        if (!$this->owner->record->isInDB()) {
            return true;
        }

        $class = $this->owner->record->class;

        $stageVersion = Versioned::get_versionnumber_by_stage($class, 'Stage', $this->owner->record->ID);

        // Return true for both completely deleted pages and for pages just deleted from stage
        return !($stageVersion);
    }
public function recordIsDeletedFromStage()
    {
        // for SiteTree records
        if ($this->owner->hasMethod('getIsDeletedFromStage')) {
            return $this->owner->IsDeletedFromStage;
        }

        if (!$this->owner->record->checkVersioned()) {
            return false;
        }

        if (!$this->owner->record->isInDB()) {
            return true;
        }

        $class = $this->owner->record->class;

        $stageVersion = Versioned::get_versionnumber_by_stage($class, 'Stage', $this->owner->record->ID);

        // Return true for both completely deleted pages and for pages just deleted from stage
        return !($stageVersion);
    }
public function recordIsDeletedFromStage ( ) { // for SiteTree records if ( $ this -> owner -> hasMethod ( 'getIsDeletedFromStage' ) ) { return $ this -> owner -> IsDeletedFromStage ; } if ( ! $ this -> owner -> record -> checkVersioned ( ) ) { return false ; } if ( ! $ this -> owner -> record -> isInDB ( ) ) { return true ; } $ class = $ this -> owner -> record -> class ; $ stageVersion = Versioned :: get_versionnumber_by_stage ( $ class , 'Stage' , $ this -> owner -> record -> ID ) ; // Return true for both completely deleted pages and for pages just deleted from stage return ! ( $ stageVersion ) ; }
Determines if the current record is deleted from stage
@return boolean
Determines if the current record is deleted from stage