summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TImage.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/UI/WebControls/TImage.php')
-rw-r--r--framework/Web/UI/WebControls/TImage.php28
1 files changed, 27 insertions, 1 deletions
diff --git a/framework/Web/UI/WebControls/TImage.php b/framework/Web/UI/WebControls/TImage.php
index 00e32765..24efd064 100644
--- a/framework/Web/UI/WebControls/TImage.php
+++ b/framework/Web/UI/WebControls/TImage.php
@@ -25,7 +25,7 @@
* @package System.Web.UI.WebControls
* @since 3.0
*/
-class TImage extends TWebControl
+class TImage extends TWebControl implements IDataRenderer
{
/**
* @return string tag name of image control
@@ -115,6 +115,32 @@ class TImage extends TWebControl
}
/**
+ * Returns the URL of the image file.
+ * This method is required by {@link IDataRenderer}.
+ * It is the same as {@link getImageUrl()}.
+ * @return string the URL of the image file.
+ * @see getImageUrl
+ * @since 3.1.0
+ */
+ public function getData()
+ {
+ return $this->getImageUrl();
+ }
+
+ /**
+ * Sets the URL of the image.
+ * This method is required by {@link IDataRenderer}.
+ * It is the same as {@link setImageUrl()}.
+ * @param string the URL of the image file.
+ * @see setImageUrl
+ * @since 3.1.0
+ */
+ public function setData($value)
+ {
+ $this->setImageUrl($value);
+ }
+
+ /**
* @return string the URL to long description
*/
public function getDescriptionUrl()