<?php

namespace AppBundle\Entity\AccessWish\Repository;

use AppBundle\Entity\HasItemQueryBuilderInterface;
use AppBundle\Entity\Organization\Organization;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\QueryBuilder;

/**
 * Description of AccessWishRepository
 *
 */
class AccessWishRepository extends EntityRepository
{

    /**
     * @param $access
     * @param $accessWhishesIds
     * @return array
     */
    public function findAccessWishByIds($accessWhishesIds)
    {
        $queryBuilder = $this->createQueryBuilder('o');
        $queryBuilder
            ->andWhere(
                $queryBuilder->expr()->in('o.id', ':ids'))
            ->setParameter('ids', $accessWhishesIds);

        return $queryBuilder->getQuery()->getResult();
    }
}
