Manager/BaseManager.php
public function delete($object, $flush = true)
    {
        try {
            $entityManager = $this->getEntityManager($object);
            $this->preDelete($object);
            $entityManager->remove($object);
            if ($flush) {
                $entityManager->flush();
            }
            $this->postDelete($object);
        } catch (\PDOException $e) {
            throw new ModelManagerException('', 0, $e);
        }
    }
public function delete($object, $flush = true)
    {
        try {
            $entityManager = $this->getEntityManager($object);
            $this->preDelete($object);
            $entityManager->remove($object);
            if ($flush) {
                $entityManager->flush();
            }
            $this->postDelete($object);
        } catch (\PDOException $e) {
            throw new ModelManagerException('', 0, $e);
        }
    }
public function delete ( $ object , $ flush = true ) { try { $ entityManager = $ this -> getEntityManager ( $ object ) ; $ this -> preDelete ( $ object ) ; $ entityManager -> remove ( $ object ) ; if ( $ flush ) { $ entityManager -> flush ( ) ; } $ this -> postDelete ( $ object ) ; } catch ( \ PDOException $ e ) { throw new ModelManagerException ( '' , 0 , $ e ) ; } }
delete an object from database.

@param Object  $object Object
@param Boolean $flush  Flush entity manager

@see Sonata\DoctrineORMAdminBundle\Model\ModelManager::delete()
delete an object from database .