summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/php/facades/CalendarFacade.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/php/facades/CalendarFacade.php b/app/php/facades/CalendarFacade.php
index 7c4e84d..cee345b 100644
--- a/app/php/facades/CalendarFacade.php
+++ b/app/php/facades/CalendarFacade.php
@@ -2,6 +2,7 @@
Prado::using('Application.facades.Facade');
Prado::using('Application.dto.CalendarGroupDTO');
+Prado::using('Application.model.Calendar');
Prado::using('Application.model.Category');
Prado::using('Application.model.UserPreference');
Prado::using('Application.user.DbUser');
@@ -47,6 +48,18 @@ class CalendarFacade extends Facade {
}
}
+ public function getAll() {
+ return Calendar::finder()->withCategory()->findAll('ORDER BY name ASC');
+ }
+
+ public function getCategories() {
+ return Category::finder()->findAll('ORDER BY name ASC');
+ }
+
+ public function get($uid) {
+ return Calendar::finder()->withCategory()->findAllByPks($uid);
+ }
+
}
?>