summaryrefslogtreecommitdiff
path: root/app/php/web/FacadeTemplateControl.php
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2016-05-13 11:23:05 +0200
committeremkael <emkael@tlen.pl>2016-05-13 11:23:05 +0200
commit3abcdafe76817b258c726c480fd021667ad84d4b (patch)
tree5285af393707d5c32c5a9d68b222016d137f5e19 /app/php/web/FacadeTemplateControl.php
parent9762e0dc7794966d890e1ed91460b126fccf53dc (diff)
* FacadeTemplateControl requires binding a facade
Diffstat (limited to 'app/php/web/FacadeTemplateControl.php')
-rw-r--r--app/php/web/FacadeTemplateControl.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/php/web/FacadeTemplateControl.php b/app/php/web/FacadeTemplateControl.php
index b713f49..05d148c 100644
--- a/app/php/web/FacadeTemplateControl.php
+++ b/app/php/web/FacadeTemplateControl.php
@@ -13,6 +13,15 @@ class FacadeTemplateControl extends TemplateControl {
return $this->getControlState('Facade');
}
+ public function onPreRender($param) {
+ parent::onPreRender($param);
+ if (!$this->getFacade()) {
+ throw new TInvalidDataValueException(
+ 'FacadeTemplateControl requires a Facade instance'
+ );
+ }
+ }
+
}
?>