summaryrefslogtreecommitdiff
path: root/app/php/controls/TimezoneSelect.php
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2016-05-06 15:40:50 +0200
committeremkael <emkael@tlen.pl>2016-05-06 15:40:50 +0200
commita43e887c380fc414121792658136a34051526b6a (patch)
tree1816ec713671d02dd3d24e92c2f4675f7deab30d /app/php/controls/TimezoneSelect.php
parent5bfe174b5907440a4f08bd45fd9c384ab5c58037 (diff)
* DbUser refactored to use a facade
Diffstat (limited to 'app/php/controls/TimezoneSelect.php')
-rw-r--r--app/php/controls/TimezoneSelect.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/php/controls/TimezoneSelect.php b/app/php/controls/TimezoneSelect.php
index 31ba15d..7ef30cb 100644
--- a/app/php/controls/TimezoneSelect.php
+++ b/app/php/controls/TimezoneSelect.php
@@ -3,6 +3,8 @@
Prado::using('Application.web.FacadeTemplateControl');
Prado::using('Application.user.DbUser');
+Prado::using('Application.facades.UserFacade');
+
Prado::using('Application.dto.TimezoneDTO');
class TimezoneSelect extends FacadeTemplateControl {
@@ -27,12 +29,15 @@ class TimezoneSelect extends FacadeTemplateControl {
$this->Timezones->DataTextField = 'Label';
$this->Timezones->dataBind();
$this->Timezones->setSelectedValue(
- $this->UserToChange->getTimezonePreference()->Name
+ $this->getFacade()->getTimezonePreference($this->UserToChange)->Name
);
}
public function saveTimezone($sender, $param) {
- $this->UserToChange->setTimezonePreference($this->Timezones->SelectedValue);
+ $this->getFacade()->setTimezonePreference(
+ $this->UserToChange,
+ $this->Timezones->SelectedValue
+ );
}
private function _getTimezones() {