From 74a3466305f837d89d8fa069fc3194f8d25f4d6f Mon Sep 17 00:00:00 2001 From: emkael Date: Wed, 6 Apr 2016 11:10:23 +0200 Subject: * lookup methods for calendars --- app/php/facades/CalendarFacade.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'app/php') 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); + } + } ?> -- cgit v1.2.3