concrete/src/Page/Collection/Version/Version.php
public function canDiscard()
    {
        $result = false;
        if ($this->isNew()) {
            $app = Facade::getFacadeApplication();
            $db = $app->make('database')->connection();
            $total = $db->fetchColumn('select count(cvID) from CollectionVersions where cID = ?', array(
                $this->cID,
            ));
            if ($total > 1) {
                $result = true;
            }
        }

        return $result;
    }
public function canDiscard()
    {
        $result = false;
        if ($this->isNew()) {
            $app = Facade::getFacadeApplication();
            $db = $app->make('database')->connection();
            $total = $db->fetchColumn('select count(cvID) from CollectionVersions where cID = ?', array(
                $this->cID,
            ));
            if ($total > 1) {
                $result = true;
            }
        }

        return $result;
    }
public function canDiscard ( ) { $ result = false ; if ( $ this -> isNew ( ) ) { $ app = Facade :: getFacadeApplication ( ) ; $ db = $ app -> make ( 'database' ) -> connection ( ) ; $ total = $ db -> fetchColumn ( 'select count(cvID) from CollectionVersions where cID = ?' , array ( $ this -> cID , ) ) ; if ( $ total > 1 ) { $ result = true ; } } return $ result ; }
Check if this collection version can be discarded.

@return bool
Check if this collection version can be discarded .