PHP Class Prado\Web\UI\WebControls\TDataListItem

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.
Since: 3.0
Author: Qiang Xue ([email protected])
Inheritance: extends TWebControl, implements Prado\Web\UI\INamingContainer, implements Prado\Web\UI\WebControls\IItemDataRenderer
Mostra file Open project: pradosoft/prado Class Usage Examples

Public Methods

Method Description
bubbleEvent ( $sender, $param ) : boolean This method overrides parent's implementation by wrapping event parameter for OnCommand event with item information.
getData ( ) : mixed
getDataItem ( ) : mixed This property is deprecated since v3.1.0.
getItemIndex ( ) : integer
getItemType ( ) : TListItemType
setData ( $value )
setDataItem ( $value ) This property is deprecated since v3.1.0.
setItemIndex ( $value ) Sets the zero-based index for the item.
setItemType ( $value )
setTagName ( $value )

Protected Methods

Method Description
createStyle ( ) : TStyle Creates a style object for the control.
getTagName ( ) : string Returns the tag name used for this control.

Method Details

bubbleEvent() public method

This method overrides parent's implementation by wrapping event parameter for OnCommand event with item information.
public bubbleEvent ( $sender, $param ) : boolean
return boolean whether the event bubbling should stop here.

createStyle() protected method

This method creates a {@link TTableItemStyle} to be used by a datalist item.
protected createStyle ( ) : TStyle
return TStyle control style to be used

getData() public method

Since: 3.1.0
public getData ( ) : mixed
return mixed data associated with the item

getDataItem() public method

This property is deprecated since v3.1.0.
Deprecation: deprecated since v3.1.0. Use {@link getData} instead.
public getDataItem ( ) : mixed
return mixed data associated with the item

getItemIndex() public method

public getItemIndex ( ) : integer
return integer zero-based index of the item in the item collection of datalist

getItemType() public method

public getItemType ( ) : TListItemType
return TListItemType item type

getTagName() protected method

Returns the tag name used for this control.
protected getTagName ( ) : string
return string tag name of the control to be rendered

setData() public method

Since: 3.1.0
public setData ( $value )

setDataItem() public method

This property is deprecated since v3.1.0.
Deprecation: deprecated since version 3.1.0. Use {@link setData} instead.
public setDataItem ( $value )

setItemIndex() public method

If the item is not in the item collection (e.g. it is a header item), -1 should be used.
public setItemIndex ( $value )

setItemType() public method

public setItemType ( $value )

setTagName() public method

public setTagName ( $value )