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
Afficher le fichier Open project: pradosoft/prado

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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 méthode

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

bubbleEvent() public méthode

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

clearStyle() public méthode

Removes all style data.
public clearStyle ( )

createStyle() protected méthode

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

getHasStyle() public méthode

public getHasStyle ( ) : boolean
Résultat boolean whether the control has defined any style information

getStyle() public méthode

public getStyle ( ) : TStyle
Résultat TStyle the object representing the css style of the control

getTagName() protected méthode

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
Résultat string tag name of the control to be rendered

render() public méthode

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 méthode

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 méthode

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 méthode

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