summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/THyperLink.php
diff options
context:
space:
mode:
authorwei <>2006-06-24 05:46:22 +0000
committerwei <>2006-06-24 05:46:22 +0000
commita6be5564823be40670e0cad8dc758557dbd37549 (patch)
tree13083fe7ea207b5426c9ee29afc36654e1ed623d /framework/Web/UI/WebControls/THyperLink.php
parentcb8b23aca4c682c58323f432aa38a88c7a695377 (diff)
Update active controls.
Diffstat (limited to 'framework/Web/UI/WebControls/THyperLink.php')
-rw-r--r--framework/Web/UI/WebControls/THyperLink.php25
1 files changed, 18 insertions, 7 deletions
diff --git a/framework/Web/UI/WebControls/THyperLink.php b/framework/Web/UI/WebControls/THyperLink.php
index 011ce4db..7827038a 100644
--- a/framework/Web/UI/WebControls/THyperLink.php
+++ b/framework/Web/UI/WebControls/THyperLink.php
@@ -68,15 +68,26 @@ class THyperLink extends TWebControl
}
else
{
- $image=Prado::createComponent('System.Web.UI.WebControls.TImage');
- $image->setImageUrl($imageUrl);
- if(($toolTip=$this->getToolTip())!=='')
- $image->setToolTip($toolTip);
- if(($text=$this->getText())!=='')
- $image->setAlternateText($text);
- $image->renderControl($writer);
+ $this->createImage($imageUrl)->renderControl($writer);
}
}
+
+ /**
+ * Gets the TImage for rendering the ImageUrl property. This is not for
+ * creating dynamic images.
+ * @param string image url.
+ * @return TImage image control for rendering.
+ */
+ protected function createImage($imageUrl)
+ {
+ $image=Prado::createComponent('System.Web.UI.WebControls.TImage');
+ $image->setImageUrl($imageUrl);
+ if(($toolTip=$this->getToolTip())!=='')
+ $image->setToolTip($toolTip);
+ if(($text=$this->getText())!=='')
+ $image->setAlternateText($text);
+ return $image;
+ }
/**
* @return string the text caption of the THyperLink