src/Versioned.php
protected function suppressDeletedVersion($callback)
    {
        $original = $this->getDeleteWritesVersion();
        try {
            $this->setDeleteWritesVersion(false);
            return $callback();
        } finally {
            $this->setDeleteWritesVersion($original);
        }
    }
protected function suppressDeletedVersion($callback)
    {
        $original = $this->getDeleteWritesVersion();
        try {
            $this->setDeleteWritesVersion(false);
            return $callback();
        } finally {
            $this->setDeleteWritesVersion($original);
        }
    }
protected function suppressDeletedVersion ( $ callback ) { $ original = $ this -> getDeleteWritesVersion ( ) ; try { $ this -> setDeleteWritesVersion ( false ) ; return $ callback ( ) ; } finally { $ this -> setDeleteWritesVersion ( $ original ) ; } }
Helper method to safely suppress delete callback

@param callable $callback
@return mixed Result of $callback()
Helper method to safely suppress delete callback