Entity/Repositories/NotificationRepository.php
public function getNotificationRecipientIds()
    {
        $qb = $this->getEntityManager()->createQueryBuilder()
            ->select('n.recipient_id')
            ->distinct()
            ->from("Azine\EmailBundle\Entity\Notification", 'n')
            ->andWhere('n.sent is null');
        $results = $qb->getQuery()->execute();

        $ids = array();
        foreach ($results as $next) {
            $ids[] = $next['recipient_id'];
        }

        return $ids;
    }
public function getNotificationRecipientIds()
    {
        $qb = $this->getEntityManager()->createQueryBuilder()
            ->select('n.recipient_id')
            ->distinct()
            ->from("Azine\EmailBundle\Entity\Notification", 'n')
            ->andWhere('n.sent is null');
        $results = $qb->getQuery()->execute();

        $ids = array();
        foreach ($results as $next) {
            $ids[] = $next['recipient_id'];
        }

        return $ids;
    }
public function getNotificationRecipientIds ( ) { $ qb = $ this -> getEntityManager ( ) -> createQueryBuilder ( ) -> select ( 'n.recipient_id' ) -> distinct ( ) -> from ( "Azine\EmailBundle\Entity\Notification" , 'n' ) -> andWhere ( 'n.sent is null' ) ; $ results = $ qb -> getQuery ( ) -> execute ( ) ; $ ids = array ( ) ; foreach ( $ results as $ next ) { $ ids [ ] = $ next [ 'recipient_id' ] ; } return $ ids ; }
Get all recipients with unsent Notifications.

@return array
Get all recipients with unsent Notifications .