summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/UI/WebControls')
-rw-r--r--framework/Web/UI/WebControls/TDataGridItemRenderer.php80
-rw-r--r--framework/Web/UI/WebControls/TDataListItemRenderer.php1
-rw-r--r--framework/Web/UI/WebControls/TItemDataRenderer.php1
3 files changed, 5 insertions, 77 deletions
diff --git a/framework/Web/UI/WebControls/TDataGridItemRenderer.php b/framework/Web/UI/WebControls/TDataGridItemRenderer.php
index 24b080c1..13a3c8ec 100644
--- a/framework/Web/UI/WebControls/TDataGridItemRenderer.php
+++ b/framework/Web/UI/WebControls/TDataGridItemRenderer.php
@@ -11,95 +11,21 @@
*/
Prado::using('System.Web.UI.WebControls.TDataGrid');
+Prado::using('System.Web.UI.WebControls.TItemDataRenderer');
/**
* TDataGridItemRenderer class
*
* TDataGridItemRenderer can be used as a convenient base class to
- * define an item renderer class for {@link TDataGrid}.
+ * define an item renderer class specific for {@link TDataGrid}.
*
- * Because TDataGridItemRenderer extends from {@link TTemplateControl}, derived child classes
- * can have templates to define their presentational layout.
- *
- * TDataGridItemRenderer implements {@link IItemDataRenderer} interface,
- * which enables the following properties that are related with data-bound controls:
- * - {@link getItemIndex ItemIndex}: zero-based index of the datagrid item containing this control.
- * - {@link getItemType ItemType}: type of the datagrid item containing this control, such as TListItemType::AlternatingItem
- * - {@link getData Data}: the data row associated with the datagrid item that this control resides in
-
* @author Qiang Xue <qiang.xue@gmail.com>
* @version $Id$
* @package System.Web.UI.WebControls
* @since 3.1.0
*/
-class TDataGridItemRenderer extends TTemplateControl implements IItemDataRenderer
+class TDataGridItemRenderer extends TItemDataRenderer
{
- /**
- * index of the data item in the Items collection of datalist
- */
- private $_itemIndex;
- /**
- * type of the TDataGridItem
- * @var TListItemType
- */
- private $_itemType;
- /**
- * data associated with this item
- * @var mixed
- */
- private $_data;
-
- /**
- * @return TListItemType item type
- */
- public function getItemType()
- {
- return $this->_itemType;
- }
-
- /**
- * @param TListItemType item type.
- */
- public function setItemType($value)
- {
- $this->_itemType=TPropertyValue::ensureEnum($value,'TListItemType');
- }
-
- /**
- * Returns a value indicating the zero-based index of the item in the corresponding data control's item collection.
- * If the item is not in the collection (e.g. it is a header item), it returns -1.
- * @return integer zero-based index of the item.
- */
- public function getItemIndex()
- {
- return $this->_itemIndex;
- }
-
- /**
- * Sets the zero-based index for the item.
- * If the item is not in the item collection (e.g. it is a header item), -1 should be used.
- * @param integer zero-based index of the item.
- */
- public function setItemIndex($value)
- {
- $this->_itemIndex=TPropertyValue::ensureInteger($value);
- }
-
- /**
- * @return mixed the data row associated with the datagrid item
- */
- public function getData()
- {
- return $this->_data;
- }
-
- /**
- * @param mixed the data row to be associated with the datagrid item
- */
- public function setData($value)
- {
- $this->_data=$value;
- }
}
?> \ No newline at end of file
diff --git a/framework/Web/UI/WebControls/TDataListItemRenderer.php b/framework/Web/UI/WebControls/TDataListItemRenderer.php
index 40eea582..9f3113df 100644
--- a/framework/Web/UI/WebControls/TDataListItemRenderer.php
+++ b/framework/Web/UI/WebControls/TDataListItemRenderer.php
@@ -11,6 +11,7 @@
*/
Prado::using('System.Web.UI.WebControls.TDataList');
+Prado::using('System.Web.UI.WebControls.TItemDataRenderer');
/**
* TDataListItemRenderer class
diff --git a/framework/Web/UI/WebControls/TItemDataRenderer.php b/framework/Web/UI/WebControls/TItemDataRenderer.php
index 1115b862..933efc3e 100644
--- a/framework/Web/UI/WebControls/TItemDataRenderer.php
+++ b/framework/Web/UI/WebControls/TItemDataRenderer.php
@@ -12,6 +12,7 @@
*/
Prado::using('System.Web.UI.WebControls.TDataBoundControl');
+Prado::using('System.Web.UI.WebControls.TDataRenderer');
/**
* TItemDataRenderer class