PHP Class Prado\Web\UI\WebControls\TDataListItemRenderer

TDataListItemRenderer can be used as a convenient base class to define an item renderer class specific for {@link TDataList}. TDataListItemRenderer extends {@link TItemDataRenderer} and implements the bubbling scheme for the OnCommand event of data list items. TDataListItemRenderer also implements the {@link IStyleable} interface, which allows TDataList to apply CSS styles to the renders.
Since: 3.1.0
Author: Qiang Xue ([email protected])
Inheritance: extends TItemDataRenderer, implements Prado\Web\UI\WebControls\IStyleable
Datei anzeigen Open project: pradosoft/prado

Public Methods

Method Description
bubbleEvent ( $sender, $param ) : boolean This method overrides parent's implementation by wrapping event parameter for OnCommand event with item information.
clearStyle ( ) Removes all style data.
getHasStyle ( ) : boolean
getStyle ( ) : TStyle
render ( $writer ) Renders the control.
renderBeginTag ( $writer ) Renders the openning tag for the control (including attributes) This method is invoked when {@link getTagName TagName} is not empty.
renderContents ( $writer ) Renders the body content enclosed between the control tag.
renderEndTag ( $writer ) Renders the closing tag for the control This method is invoked when {@link getTagName TagName} is not empty.

Protected Methods

Method Description
addAttributesToRender ( $writer ) Adds attribute name-value pairs to renderer.
createStyle ( ) : TStyle Creates a style object to be used by the control.
getTagName ( ) : string Returns the tag name used for this control.

Method Details

addAttributesToRender() protected method

By default, this method renders the style string. The method can be overriden to provide customized attribute rendering.
protected addAttributesToRender ( $writer )

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.

clearStyle() public method

Removes all style data.
public clearStyle ( )

createStyle() protected method

This method may be overriden by controls to provide customized style.
protected createStyle ( ) : TStyle
return TStyle

getHasStyle() public method

public getHasStyle ( ) : boolean
return boolean whether the control has defined any style information

getStyle() public method

public getStyle ( ) : TStyle
return TStyle the object representing the css style of the control

getTagName() protected method

By default, the tag name is 'span'. You can override this method to provide customized tag names. If the tag name is empty, the opening and closing tag will NOT be rendered.
protected getTagName ( ) : string
return string tag name of the control to be rendered

render() public method

This method overrides the parent implementation by replacing it with the following sequence: - {@link renderBeginTag} - {@link renderContents} - {@link renderEndTag} If the {@link getTagName TagName} is empty, only {@link renderContents} is invoked.
public render ( $writer )

renderBeginTag() public method

Renders the openning tag for the control (including attributes) This method is invoked when {@link getTagName TagName} is not empty.
public renderBeginTag ( $writer )

renderContents() public method

By default, child controls and text strings will be rendered. You can override this method to provide customized content rendering.
public renderContents ( $writer )

renderEndTag() public method

Renders the closing tag for the control This method is invoked when {@link getTagName TagName} is not empty.
public renderEndTag ( $writer )