diff options
-rw-r--r-- | framework/Exceptions/messages.txt | 1 | ||||
-rw-r--r-- | framework/Web/UI/TTemplateControl.php | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/framework/Exceptions/messages.txt b/framework/Exceptions/messages.txt index 90872e2f..cbb7cf04 100644 --- a/framework/Exceptions/messages.txt +++ b/framework/Exceptions/messages.txt @@ -164,6 +164,7 @@ control_stylesheet_applied = StyleSheet skin has already been applied to {0}. control_id_nonunique = {0}.ID '{1}' is not unique among all controls under the same naming container.
templatecontrol_mastercontrol_invalid = Master control must be of type TTemplateControl or a child class.
+templatecontrol_mastercontrol_required = Control '{0}' requires a master control since the control uses TContent.
templatecontrol_contentid_duplicated = TContent ID '{0}' is duplicated.
templatecontrol_placeholderid_duplicated= TContentPlaceHolder ID '{0}' is duplicated.
templatecontrol_directive_invalid = {0}.{1} can only accept a static text string through a template directive.
diff --git a/framework/Web/UI/TTemplateControl.php b/framework/Web/UI/TTemplateControl.php index 3bbe52c5..7d1f2d7e 100644 --- a/framework/Web/UI/TTemplateControl.php +++ b/framework/Web/UI/TTemplateControl.php @@ -235,6 +235,8 @@ class TTemplateControl extends TCompositeControl foreach($this->_contents as $id=>$content)
$master->injectContent($id,$content);
}
+ else if(!empty($this->_contents))
+ throw new TConfigurationException('templatecontrol_mastercontrol_required',get_class($this));
parent::initRecursive($namingContainer);
}
}
|