summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/THyperLink.php
diff options
context:
space:
mode:
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