From 633ae42f1c6f7069ba155ffa1bbc3b42fe189bb4 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 4 Feb 2007 03:30:32 +0000 Subject: Added renderer feature to TRepeater. --- framework/Web/UI/WebControls/TLinkButton.php | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'framework/Web/UI/WebControls/TLinkButton.php') diff --git a/framework/Web/UI/WebControls/TLinkButton.php b/framework/Web/UI/WebControls/TLinkButton.php index ffa83d02..b193226e 100644 --- a/framework/Web/UI/WebControls/TLinkButton.php +++ b/framework/Web/UI/WebControls/TLinkButton.php @@ -54,7 +54,7 @@ * @package System.Web.UI.WebControls * @since 3.0 */ -class TLinkButton extends TWebControl implements IPostBackEventHandler, IButtonControl +class TLinkButton extends TWebControl implements IPostBackEventHandler, IButtonControl, IDataRenderer { /** * @return string tag name of the button @@ -182,6 +182,32 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler, IButtonC $this->setViewState('Text',$value,''); } + /** + * Returns the caption of the button. + * This method is required by {@link IDataRenderer}. + * It is the same as {@link getText()}. + * @return string caption of the button. + * @see getText + * @since 3.1.0 + */ + public function getData() + { + return $this->getText(); + } + + /** + * Sets the caption of the button. + * This method is required by {@link IDataRenderer}. + * It is the same as {@link setText()}. + * @param string caption of the button + * @see setText + * @since 3.1.0 + */ + public function setData($value) + { + $this->setText($value); + } + /** * @return string the command name associated with the {@link onCommand OnCommand} event. */ -- cgit v1.2.3