From f85d1a050dbacfc71c7c619df7b7eb792c89d8ee Mon Sep 17 00:00:00 2001 From: xue <> Date: Sat, 26 Nov 2005 17:35:40 +0000 Subject: --- framework/Web/UI/WebControls/TImage.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'framework/Web/UI/WebControls/TImage.php') diff --git a/framework/Web/UI/WebControls/TImage.php b/framework/Web/UI/WebControls/TImage.php index dd0387a5..452bae4e 100644 --- a/framework/Web/UI/WebControls/TImage.php +++ b/framework/Web/UI/WebControls/TImage.php @@ -35,6 +35,17 @@ class TImage extends TWebControl return 'img'; } + /** + * Processes an object that is created during parsing template. + * This method overrides the parent implementation by forbidding any child controls. + * @param string|TComponent text string or component parsed and instantiated in template + */ + public function addParsedObject($object) + { + if($object instanceof TComponent) + throw new TConfigurationException('image_body_forbidden'); + } + /** * Adds attributes related to an HTML image element to renderer. * @param THtmlWriter the writer used for the rendering purpose -- cgit v1.2.3