summaryrefslogtreecommitdiff
path: root/app/php/controls/UpcomingEvents.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/php/controls/UpcomingEvents.php')
-rw-r--r--app/php/controls/UpcomingEvents.php33
1 files changed, 0 insertions, 33 deletions
diff --git a/app/php/controls/UpcomingEvents.php b/app/php/controls/UpcomingEvents.php
deleted file mode 100644
index 27fc723..0000000
--- a/app/php/controls/UpcomingEvents.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-
-Prado::using('Application.web.FacadeTemplateControl');
-Prado::using('Application.user.DbUser');
-Prado::using('Application.facades.EventFacade');
-
-class UpcomingEvents extends FacadeTemplateControl {
-
- public function getUserToDisplay() {
- return $this->getControlState('user');
- }
-
- public function setUserToDisplay(DbUser $user) {
- $this->setControlState('user', $user);
- }
-
- public function getEvents() {
- return $this->_getEventsForUser($this->UserToDisplay);
- }
-
- private function _getEventsForUser(DbUser $user) {
- $utc = new DateTimeZone('UTC');
- $dateFrom = new DateTime('now', $utc);
- $dateTo = new DateTime('+7 days', $utc);
- return $this->getFacade()->getTimeframeListForUser(
- $user,
- $dateFrom, $dateTo
- );
- }
-
-}
-
-?>