From 3abcdafe76817b258c726c480fd021667ad84d4b Mon Sep 17 00:00:00 2001 From: emkael Date: Fri, 13 May 2016 11:23:05 +0200 Subject: * FacadeTemplateControl requires binding a facade --- app/php/web/FacadeTemplateControl.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'app/php/web/FacadeTemplateControl.php') 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' + ); + } + } + } ?> -- cgit v1.2.3