diff options
Diffstat (limited to 'app/php/controls')
-rw-r--r-- | app/php/controls/UserSelection.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/php/controls/UserSelection.php b/app/php/controls/UserSelection.php index d888a2d..3e2def1 100644 --- a/app/php/controls/UserSelection.php +++ b/app/php/controls/UserSelection.php @@ -4,6 +4,14 @@ Prado::using('Application.facades.CalendarFacade'); class UserSelection 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'); } @@ -27,7 +35,7 @@ class UserSelection extends TTemplateControl { public function removeFromSelection($sender, $param) { if (!$this->UserToDisplay->IsGuest) { - return CalendarFacade::getInstance()->removeFromPreference( + return $this->getFacade()->removeFromPreference( $this->UserToDisplay, $param->CommandParameter ); @@ -35,7 +43,7 @@ class UserSelection extends TTemplateControl { } private function _getUserSelection(DbUser $user) { - return CalendarFacade::getInstance()->getPreferenceList($user); + return $this->getFacade()->getPreferenceList($user); } } |