protected function onBeforeDelete() {
        parent::onBeforeDelete();
        
        //Remove all Snippets from this folder
        DB::query('UPDATE "Snippet" SET "FolderID"='.$this->ParentID.' WHERE "FolderID"='.$this->ID);
        
        //Remove all Snippet Folders from this folder
        DB::query('UPDATE "SnippetFolder" SET "ParentID"='.$this->ParentID.' WHERE "ParentID"='.$this->ID);
    }
protected function onBeforeDelete() {
        parent::onBeforeDelete();
        
        //Remove all Snippets from this folder
        DB::query('UPDATE "Snippet" SET "FolderID"='.$this->ParentID.' WHERE "FolderID"='.$this->ID);
        
        //Remove all Snippet Folders from this folder
        DB::query('UPDATE "SnippetFolder" SET "ParentID"='.$this->ParentID.' WHERE "ParentID"='.$this->ID);
    }
protected function onBeforeDelete ( ) { parent :: onBeforeDelete ( ) ; //Remove all Snippets from this folder DB :: query ( 'UPDATE "Snippet" SET "FolderID"=' . $ this -> ParentID . ' WHERE "FolderID"=' . $ this -> ID ) ; //Remove all Snippet Folders from this folder DB :: query ( 'UPDATE "SnippetFolder" SET "ParentID"=' . $ this -> ParentID . ' WHERE "ParentID"=' . $ this -> ID ) ; }
Removes all snippets from the folder before deleting
Removes all snippets from the folder before deleting