summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TDataList.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/UI/WebControls/TDataList.php')
-rw-r--r--framework/Web/UI/WebControls/TDataList.php273
1 files changed, 1 insertions, 272 deletions
diff --git a/framework/Web/UI/WebControls/TDataList.php b/framework/Web/UI/WebControls/TDataList.php
index 021fdf6d..a17ac6c3 100644
--- a/framework/Web/UI/WebControls/TDataList.php
+++ b/framework/Web/UI/WebControls/TDataList.php
@@ -1486,275 +1486,4 @@ class TDataList extends TBaseDataList implements INamingContainer, IRepeatInfoUs
parent::render($writer);
}
}
-}
-
-
-/**
- * TDataListItemEventParameter class
- *
- * TDataListItemEventParameter encapsulates the parameter data for
- * {@link TDataList::onItemCreated ItemCreated} event of {@link TDataList} controls.
- * The {@link getItem Item} property indicates the DataList item related with the event.
- *
- * @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Web.UI.WebControls
- * @since 3.0
- */
-class TDataListItemEventParameter extends TEventParameter
-{
- /**
- * The datalist item control responsible for the event.
- * @var TControl
- */
- private $_item=null;
-
- /**
- * Constructor.
- * @param TControl DataList item related with the corresponding event
- */
- public function __construct($item)
- {
- $this->_item=$item;
- }
-
- /**
- * @return TControl datalist item related with the corresponding event
- */
- public function getItem()
- {
- return $this->_item;
- }
-}
-
-/**
- * TDataListCommandEventParameter class
- *
- * TDataListCommandEventParameter encapsulates the parameter data for
- * {@link TDataList::onItemCommand ItemCommand} event of {@link TDataList} controls.
- *
- * The {@link getItem Item} property indicates the DataList item related with the event.
- * The {@link getCommandSource CommandSource} refers to the control that originally
- * raises the Command event.
- *
- * @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Web.UI.WebControls
- * @since 3.0
- */
-class TDataListCommandEventParameter extends TCommandEventParameter
-{
- /**
- * @var TControl the datalist item control responsible for the event.
- */
- private $_item=null;
- /**
- * @var TControl the control originally raises the <b>OnCommand</b> event.
- */
- private $_source=null;
-
- /**
- * Constructor.
- * @param TControl datalist item responsible for the event
- * @param TControl original event sender
- * @param TCommandEventParameter original event parameter
- */
- public function __construct($item,$source,TCommandEventParameter $param)
- {
- $this->_item=$item;
- $this->_source=$source;
- parent::__construct($param->getCommandName(),$param->getCommandParameter());
- }
-
- /**
- * @return TControl the datalist item control responsible for the event.
- */
- public function getItem()
- {
- return $this->_item;
- }
-
- /**
- * @return TControl the control originally raises the <b>OnCommand</b> event.
- */
- public function getCommandSource()
- {
- return $this->_source;
- }
-}
-
-/**
- * TDataListItem class
- *
- * A TDataListItem control represents an item in the {@link TDataList} control,
- * such as heading section, footer section, or a data item.
- * The index and data value of the item can be accessed via {@link getItemIndex ItemIndex}>
- * and {@link getDataItem DataItem} properties, respectively. The type of the item
- * is given by {@link getItemType ItemType} property.
- *
- * @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Web.UI.WebControls
- * @since 3.0
- */
-class TDataListItem extends TWebControl implements INamingContainer, IItemDataRenderer
-{
- /**
- * index of the data item in the Items collection of DataList
- */
- private $_itemIndex;
- /**
- * type of the TDataListItem
- * @var TListItemType
- */
- private $_itemType;
- /**
- * value of the data associated with this item
- * @var mixed
- */
- private $_data;
-
- private $_tagName='span';
-
- /**
- * Returns the tag name used for this control.
- * @return string tag name of the control to be rendered
- */
- protected function getTagName()
- {
- return $this->_tagName;
- }
-
- /**
- * @param string tag name of the control to be rendered
- */
- public function setTagName($value)
- {
- $this->_tagName=$value;
- }
-
- /**
- * Creates a style object for the control.
- * This method creates a {@link TTableItemStyle} to be used by a datalist item.
- * @return TStyle control style to be used
- */
- protected function createStyle()
- {
- return new TTableItemStyle;
- }
-
- /**
- * @return TListItemType item type
- */
- public function getItemType()
- {
- return $this->_itemType;
- }
-
- /**
- * @param TListItemType item type.
- */
- public function setItemType($value)
- {
- $this->_itemType=TPropertyValue::ensureEnum($value,'TListItemType');
- }
-
- /**
- * @return integer zero-based index of the item in the item collection of datalist
- */
- 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 data associated with the item
- * @since 3.1.0
- */
- public function getData()
- {
- return $this->_data;
- }
-
- /**
- * @param mixed data to be associated with the item
- * @since 3.1.0
- */
- public function setData($value)
- {
- $this->_data=$value;
- }
-
- /**
- * This property is deprecated since v3.1.0.
- * @return mixed data associated with the item
- * @deprecated deprecated since v3.1.0. Use {@link getData} instead.
- */
- public function getDataItem()
- {
- return $this->getData();
- }
-
- /**
- * This property is deprecated since v3.1.0.
- * @param mixed data to be associated with the item
- * @deprecated deprecated since version 3.1.0. Use {@link setData} instead.
- */
- public function setDataItem($value)
- {
- return $this->setData($value);
- }
-
- /**
- * This method overrides parent's implementation by wrapping event parameter
- * for <b>OnCommand</b> event with item information.
- * @param TControl the sender of the event
- * @param TEventParameter event parameter
- * @return boolean whether the event bubbling should stop here.
- */
- public function bubbleEvent($sender,$param)
- {
- if($param instanceof TCommandEventParameter)
- {
- $this->raiseBubbleEvent($this,new TDataListCommandEventParameter($this,$sender,$param));
- return true;
- }
- else
- return false;
- }
-}
-
-/**
- * TDataListItemCollection class.
- *
- * TDataListItemCollection represents a collection of data list items.
- *
- * @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Web.UI.WebControls
- * @since 3.0
- */
-class TDataListItemCollection extends TList
-{
- /**
- * Inserts an item at the specified position.
- * This overrides the parent implementation by inserting only TControl descendants.
- * @param integer the speicified position.
- * @param mixed new item
- * @throws TInvalidDataTypeException if the item to be inserted is not a TControl descendant.
- */
- public function insertAt($index,$item)
- {
- if($item instanceof TControl)
- parent::insertAt($index,$item);
- else
- throw new TInvalidDataTypeException('datalistitemcollection_datalistitem_required');
- }
-}
-
+} \ No newline at end of file