summaryrefslogtreecommitdiff
path: root/app/frontend/facades/EventFacade.php
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2016-06-16 11:48:31 +0200
committeremkael <emkael@tlen.pl>2016-06-16 11:50:22 +0200
commit7af1ebdd7216f14778bdfa68c39a8e2050413a1f (patch)
tree3f276f63df7d049ba9da5e92b1151277141eaea0 /app/frontend/facades/EventFacade.php
parent01bbbb7336835451888dabfb1fc7e874986585ad (diff)
* differring view between grouped and normal view based on user preference
Diffstat (limited to 'app/frontend/facades/EventFacade.php')
-rw-r--r--app/frontend/facades/EventFacade.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/frontend/facades/EventFacade.php b/app/frontend/facades/EventFacade.php
index 14f809d..79ca363 100644
--- a/app/frontend/facades/EventFacade.php
+++ b/app/frontend/facades/EventFacade.php
@@ -5,6 +5,7 @@ Prado::using('Application.dto.EventDTO');
Prado::using('Application.dto.TimezoneDTO');
Prado::using('Application.dto.GridEventDTO');
Prado::using('Application.dto.CalendarGridDTO');
+Prado::using('Application.dto.GroupedCalendarGridDTO');
Prado::using('Application.model.Calendar');
Prado::using('Application.facades.CalendarFacade');
Prado::using('Application.user.DbUser');
@@ -86,7 +87,11 @@ class EventFacade extends Facade {
$timeframe = CalendarFacade::getInstance()->getCalendarBoundaries(
$year, $month, $timezone
);
- return new CalendarGridDTO(
+ $dtoClass = 'CalendarGridDTO';
+ if (UserFacade::getInstance()->getGroupedViewPreference($user)) {
+ $dtoClass = 'Grouped' . $dtoClass;
+ }
+ return new $dtoClass(
$this->getTimeframeListForUser(
$user,
$timeframe[0], $timeframe[1],