From 823d71ced9b4947b1a5a5ade7245d521ed490061 Mon Sep 17 00:00:00 2001 From: emkael Date: Tue, 7 Jun 2016 15:17:49 +0200 Subject: * renaming php directory --- app/frontend/controls/UrlBasedCalendarControl.php | 40 +++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 app/frontend/controls/UrlBasedCalendarControl.php (limited to 'app/frontend/controls/UrlBasedCalendarControl.php') diff --git a/app/frontend/controls/UrlBasedCalendarControl.php b/app/frontend/controls/UrlBasedCalendarControl.php new file mode 100644 index 0000000..a5be82e --- /dev/null +++ b/app/frontend/controls/UrlBasedCalendarControl.php @@ -0,0 +1,40 @@ +getFacade()->resolveUrl($url); + if ($calendar) { + $this->setControlState('Calendar', $calendar); + return; + } + } + if ($this->getRaiseException()) { + throw new THttpException( + 404, + Prado::localize('Page not found') + ); + } else { + $this->Visible = FALSE; + } + } + + public function getCalendar() { + return $this->getControlState('Calendar'); + } + + public function setRaiseException($value) { + $this->setControlState('RaiseException', TPropertyValue::ensureBoolean($value)); + } + + public function getRaiseException() { + return $this->getControlState('RaiseException', FALSE); + } + +} + +?> -- cgit v1.2.3