summaryrefslogtreecommitdiff
path: root/app/php/controls/UrlBasedCalendarControl.php
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2016-05-09 10:33:32 +0200
committeremkael <emkael@tlen.pl>2016-05-09 12:38:03 +0200
commit08cddef698960a5c4f354be3edc52531fc2cdc3f (patch)
tree8eb33b9a50a2aa1651a2f20a9fa674e9ef206896 /app/php/controls/UrlBasedCalendarControl.php
parent09d36e18f8e5d7ea5b005606cf9585c2e6c639cd (diff)
* raising THttpException is now optional in URL-based calendar controls
Diffstat (limited to 'app/php/controls/UrlBasedCalendarControl.php')
-rw-r--r--app/php/controls/UrlBasedCalendarControl.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/app/php/controls/UrlBasedCalendarControl.php b/app/php/controls/UrlBasedCalendarControl.php
index 336417b..b3e2253 100644
--- a/app/php/controls/UrlBasedCalendarControl.php
+++ b/app/php/controls/UrlBasedCalendarControl.php
@@ -13,13 +13,25 @@ class UrlBasedCalendarControl extends FacadeTemplateControl {
return;
}
}
- throw new THttpException(404, 'Page not found');
+ if ($this->getRaiseException()) {
+ throw new THttpException(404, '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);
+ }
+
}
?>