/**
  * @param Section   $section
  * @param \DateTime $start
  * @param \DateTime $end
  *
  * @return mixed
  */
 public function getSectionsNewUsersBetweenDates(Section $section, \DateTime $start, \DateTime $end)
 {
     $qb = $this->createQueryBuilder('s');
     $qb->leftJoin('s.users', 'u')->where($qb->expr()->eq('u.section', $section->getId()))->andWhere('u.joindate BETWEEN :start AND :end')->setParameter('start', $start->format('Y/m/d'))->setParameter('end', $end->format('Y/m/d'));
     return $qb->getQuery()->getResult();
 }
 /**
  * @param Section $section
  * @param $querybuilder
  *
  * @return \Doctrine\ORM\QueryBuilder|array
  */
 public function getUniversitiesBySection(Section $section, $querybuilder = false)
 {
     $qb = $this->createQueryBuilder('uni');
     $qb->where($qb->expr()->eq('uni.section', $section->getId()))->orderBy('uni.univercity', 'ASC');
     return $querybuilder ? $qb : $qb->getQuery()->getResult();
 }
 public function findBCBysection(Section $section)
 {
     $qb = $this->createQueryBuilder('u');
     $qb->where('u.roles LIKE :bc')->setParameter('bc', "%ROLE_BUDDYCOORDINATOR%")->andWhere($qb->expr()->eq('u.section', $section->getId()));
     return $qb->getQuery()->getResult();
 }