diff options
author | emkael <emkael@tlen.pl> | 2016-05-13 11:23:05 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2016-05-13 11:23:05 +0200 |
commit | 3abcdafe76817b258c726c480fd021667ad84d4b (patch) | |
tree | 5285af393707d5c32c5a9d68b222016d137f5e19 | |
parent | 9762e0dc7794966d890e1ed91460b126fccf53dc (diff) |
* FacadeTemplateControl requires binding a facade
-rw-r--r-- | app/php/web/FacadeTemplateControl.php | 9 |
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' + ); + } + } + } ?> |