Doctrine/ORM/Listener/SharingDeleteListener.php
private function buildDeleteQuery(EntityManagerInterface $em)
    {
        $qb = $em->createQueryBuilder()
            ->delete($this->sharingClass, 's')
        ;

        $this->buildCriteria($qb, $this->deleteSharingSubjects, 'subjectClass', 'subjectId');
        $this->buildCriteria($qb, $this->deleteSharingIdentities, 'identityClass', 'identityName');

        return $qb->getQuery();
    }
private function buildDeleteQuery(EntityManagerInterface $em)
    {
        $qb = $em->createQueryBuilder()
            ->delete($this->sharingClass, 's')
        ;

        $this->buildCriteria($qb, $this->deleteSharingSubjects, 'subjectClass', 'subjectId');
        $this->buildCriteria($qb, $this->deleteSharingIdentities, 'identityClass', 'identityName');

        return $qb->getQuery();
    }
private function buildDeleteQuery ( EntityManagerInterface $ em ) { $ qb = $ em -> createQueryBuilder ( ) -> delete ( $ this -> sharingClass , 's' ) ; $ this -> buildCriteria ( $ qb , $ this -> deleteSharingSubjects , 'subjectClass' , 'subjectId' ) ; $ this -> buildCriteria ( $ qb , $ this -> deleteSharingIdentities , 'identityClass' , 'identityName' ) ; return $ qb -> getQuery ( ) ; }
Build the delete query.

@param EntityManagerInterface $em The entity manager

@return Query
Build the delete query .