src/Extensions/ArchiveRestoreAction.php
protected function shouldDisplayAction($record)
    {
        $admin = $this->owner->popupController;
        // If the record is a File, check if the file binary was archived
        $hasFileSaved = $record instanceof File ? $record->exists() : true;
        return (
            $hasFileSaved &&
            $admin instanceof ArchiveAdmin &&
            DataObject::has_extension($record, Versioned::class) &&
            $record->canRestoreToDraft()
        );
    }
protected function shouldDisplayAction($record)
    {
        $admin = $this->owner->popupController;
        // If the record is a File, check if the file binary was archived
        $hasFileSaved = $record instanceof File ? $record->exists() : true;
        return (
            $hasFileSaved &&
            $admin instanceof ArchiveAdmin &&
            DataObject::has_extension($record, Versioned::class) &&
            $record->canRestoreToDraft()
        );
    }
protected function shouldDisplayAction ( $ record ) { $ admin = $ this -> owner -> popupController ; // If the record is a File, check if the file binary was archived $ hasFileSaved = $ record instanceof File ? $ record -> exists ( ) : true ; return ( $ hasFileSaved && $ admin instanceof ArchiveAdmin && DataObject :: has_extension ( $ record , Versioned :: class ) && $ record -> canRestoreToDraft ( ) ) ; }
Returns whether the restore action should be displayed

@param $record
@return bool
Returns whether the restore action should be displayed