diff options
author | xue <> | 2006-07-16 01:50:23 +0000 |
---|---|---|
committer | xue <> | 2006-07-16 01:50:23 +0000 |
commit | af68030fcf0c266300feb2c100149ecadef7d364 (patch) | |
tree | 76b7c8ad5d8227870b9ef10c3e7b92a36336b320 /framework/Web/UI/TControl.php | |
parent | 4b78404c20490a615459267426ce9e6737bf4485 (diff) |
Merge from 3.0 branch till 1264.
Diffstat (limited to 'framework/Web/UI/TControl.php')
-rw-r--r-- | framework/Web/UI/TControl.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/framework/Web/UI/TControl.php b/framework/Web/UI/TControl.php index 34aeb85e..aa8ea2a3 100644 --- a/framework/Web/UI/TControl.php +++ b/framework/Web/UI/TControl.php @@ -453,6 +453,28 @@ class TControl extends TApplicationComponent implements IRenderable, IBindable }
/**
+ * Returns custom data associated with this control.
+ * A control may be associated with some custom data for various purposes.
+ * For example, a button may be associated with a string to identify itself
+ * in a generic OnClick event handler.
+ * @return mixed custom data associated with this control. Defaults to null.
+ */
+ public function getCustomData()
+ {
+ return $this->getViewState('CustomData',null);
+ }
+
+ /**
+ * Associates custom data with this control.
+ * Note, the custom data must be serializable and unserializable.
+ * @param mixed custom data
+ */
+ public function setCustomData($value)
+ {
+ $this->getViewState('CustomData',$value,null);
+ }
+
+ /**
* @return boolean whether the control has child controls
*/
public function getHasControls()
|