Show events for today
This commit is contained in:
parent
0f34bb4242
commit
2fce8b3cfd
3 changed files with 11 additions and 3 deletions
|
@ -56,6 +56,9 @@ class LocationController extends Controller
|
|||
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$now = new \DateTime();
|
||||
$now->setTime(0,0,0);
|
||||
|
||||
/** @var QueryBuilder $qb */
|
||||
$qb = $em->createQueryBuilder();
|
||||
$qb ->select(array('e'))
|
||||
|
@ -63,7 +66,7 @@ class LocationController extends Controller
|
|||
->where('e.startdate >= :startdate')
|
||||
->andWhere('e.locations_id = :location')
|
||||
->orderBy('e.startdate')
|
||||
->setParameter('startdate',new \DateTime())
|
||||
->setParameter('startdate',$now)
|
||||
->setParameter('location',$location->getId());
|
||||
$entities = $qb->getQuery()->execute();
|
||||
|
||||
|
|
Reference in a new issue