diff options
Diffstat (limited to 'app/php/controls/UpcomingEvents.php')
-rw-r--r-- | app/php/controls/UpcomingEvents.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/php/controls/UpcomingEvents.php b/app/php/controls/UpcomingEvents.php index 27fa8c6..3b0869a 100644 --- a/app/php/controls/UpcomingEvents.php +++ b/app/php/controls/UpcomingEvents.php @@ -4,6 +4,14 @@ Prado::using('Application.facades.EventFacade'); class UpcomingEvents extends TTemplateControl { + public function setFacade(Facade $facade) { + $this->setViewState('Facade', $facade); + } + + public function getFacade() { + return $this->getViewState('Facade'); + } + public function getUserToDisplay() { return $this->getControlState('user'); } @@ -24,7 +32,7 @@ class UpcomingEvents extends TTemplateControl { $utc = new DateTimeZone('UTC'); $dateFrom = new DateTime('now', $utc); $dateTo = new DateTime('+7 days', $utc); - return EventFacade::getInstance()->getTimeframeListForUser( + return $this->getFacade()->getTimeframeListForUser( $user, $dateFrom, $dateTo ); |