diff options
author | emkael <emkael@tlen.pl> | 2016-04-06 11:10:23 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2016-04-06 11:10:23 +0200 |
commit | 74a3466305f837d89d8fa069fc3194f8d25f4d6f (patch) | |
tree | bac0c59ab69607f448bd73eda59c298a976b4d86 /app/php/facades/CalendarFacade.php | |
parent | 609e2d582d2b5a3765e0b30c1bc983e5ac8f960b (diff) |
* lookup methods for calendars
Diffstat (limited to 'app/php/facades/CalendarFacade.php')
-rw-r--r-- | app/php/facades/CalendarFacade.php | 13 |
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); + } + } ?> |