| 1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- namespace AppBundle\Entity\Core\Repository;
- use Doctrine\ORM\EntityRepository;
- use AppBundle\Entity\AccessAndFunction\Access;
- /**
- * Description of NotificationRepository
- *
- * @author sebastienhupin
- */
- class NotificationRepository extends EntityRepository {
-
- /**
- * Find notification are not viewed by the user
- *
- * @param array $ids
- *
- * @return Array
- */
- public function findByIds(Array $ids) {
- $em = $this->getEntityManager();
- $qb = $em->createQueryBuilder('n');
- $qb->select('n')
- ->from($this->getClassName(), 'n')
- ->where($qb->expr()->in('n.id', ':ids'))
- ->setParameter('ids', $ids)
- ;
-
- return $qb->getQuery()->getResult();
- }
- }
|