| 12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- namespace AppBundle\Entity\Education\Repository;
- use AppBundle\Entity\AccessAndFunction\Access;
- use AppBundle\Entity\Education\Education;
- use Doctrine\Common\Collections\ArrayCollection;
- use Doctrine\ORM\EntityRepository;
- /**
- * Description of EducationCurriculumRepository
- *
- */
- class EducationCurriculumRepository extends EntityRepository
- {
- /**
- * @param ArrayCollection<Access> $teachers
- * @return mixed
- */
- public function findInIds($organization, $educationCurriculumIds)
- {
- $queryBuilder =
- $this->createQueryBuilder('education_curriculum');
- $queryBuilder
- ->innerJoin('education_curriculum.education', 'ed')
- ->innerJoin('ed.educationCategory', 'edc')
- ->andWhere('edc.organization=:organization')
- ->andWhere($queryBuilder->expr()->in('education_curriculum.id', ':educationCurriculumIds'))
- ->setParameter('educationCurriculumIds', $educationCurriculumIds)
- ->setParameter('organization', $organization)
- ;
- $query = $queryBuilder->getQuery();
- return $query->getResult();
- }
- }
- ?>
|