/**
  * Removes this object from datastore and sets delete attribute.
  *
  * @param      Connection $con
  * @return     void
  * @throws     PropelException
  * @see        BaseObject::setDeleted()
  * @see        BaseObject::isDeleted()
  */
 public function delete($con = null)
 {
     if ($this->isDeleted()) {
         throw new PropelException("This object has already been deleted.");
     }
     if ($con === null) {
         $con = Propel::getConnection(AppFolderPeer::DATABASE_NAME);
     }
     try {
         $con->begin();
         AppFolderPeer::doDelete($this, $con);
         $this->setDeleted(true);
         $con->commit();
     } catch (PropelException $e) {
         $con->rollback();
         throw $e;
     }
 }
Exemple #2
0
 public function remove ($FolderUid, $rootfolder)
 {
     $oCriteria = new Criteria( 'workflow' );
     $oCriteria->add( AppFolderPeer::FOLDER_UID, $FolderUid );
     AppFolderPeer::doDelete( $oCriteria );
 }