PHP Class Prado\Web\UI\WebControls\TBulletedList

TBulletedList displays items in a bullet format. The bullet style is specified by {@link setBulletStyle BulletStyle}. When the style is 'CustomImage', the {@link setBackImageUrl BulletImageUrl} specifies the image used as bullets. TBulletedList displays the item texts in three different modes, specified via {@link setDisplayMode DisplayMode}. When the mode is Text, the item texts are displayed as static texts; When the mode is 'HyperLink', each item is displayed as a hyperlink whose URL is given by the item value, and the {@link setTarget Target} property can be used to specify the target browser window; When the mode is 'LinkButton', each item is displayed as a link button which posts back to the page if a user clicks on that and the event {@link onClick OnClick} will be raised under such a circumstance.
Since: 3.0
Author: Qiang Xue ([email protected])
Inheritance: extends TListControl, implements Prado\Web\UI\IPostBackEventHandler
Datei anzeigen Open project: pradosoft/prado

Public Methods

Method Description
getBulletImageUrl ( ) : string
getBulletStyle ( ) : TBulletStyle
getDisplayMode ( ) : TBulletedListDisplayMode
getFirstBulletNumber ( ) : integer
getTarget ( ) : string
onClick ( $param ) Raises 'OnClick' event.
raisePostBackEvent ( $param ) Raises the postback event.
render ( $writer ) Renders the control.
renderContents ( $writer ) Renders the body contents.
setAutoPostBack ( $value )
setBulletImageUrl ( $value )
setBulletStyle ( $value )
setDisplayMode ( $value ) : TBulletedListDisplayMode
setFirstBulletNumber ( $value )
setSelectedIndex ( $index )
setSelectedIndices ( $indices )
setSelectedValue ( $value )
setSelectedValues ( $values )
setTarget ( $value )

Protected Methods

Method Description
addAttributesToRender ( $writer ) Adds attribute name-value pairs to renderer.
canCauseValidation ( )
getClientClassName ( ) : string Gets the name of the javascript class responsible for performing postback for this control.
getPostBackOptions ( ) : array
getTagName ( ) : string
renderBulletText ( $writer, $item, $index ) Renders each item
renderHyperLinkItem ( $writer, $item, $index )
renderLinkButtonItem ( $writer, $item, $index )
renderTextItem ( $writer, $item, $index )

Method Details

addAttributesToRender() protected method

This overrides the parent implementation with additional bulleted list specific attributes.
protected addAttributesToRender ( $writer )

canCauseValidation() protected method

protected canCauseValidation ( )

getBulletImageUrl() public method

public getBulletImageUrl ( ) : string
return string image URL used for bullets when {@link getBulletStyle BulletStyle} is 'CustomImage'.

getBulletStyle() public method

public getBulletStyle ( ) : TBulletStyle
return TBulletStyle style of bullets. Defaults to TBulletStyle::NotSet.

getClientClassName() protected method

This method overrides the parent implementation.
protected getClientClassName ( ) : string
return string the javascript class name

getDisplayMode() public method

public getDisplayMode ( ) : TBulletedListDisplayMode
return TBulletedListDisplayMode display mode of the list. Defaults to TBulletedListDisplayMode::Text.

getFirstBulletNumber() public method

public getFirstBulletNumber ( ) : integer
return integer starting index when {@link getBulletStyle BulletStyle} is one of the following: 'Numbered', 'LowerAlpha', 'UpperAlpha', 'LowerRoman', 'UpperRoman'. Defaults to 1.

getPostBackOptions() protected method

protected getPostBackOptions ( ) : array
return array postback options used for linkbuttons.

getTagName() protected method

protected getTagName ( ) : string
return string tag name of the bulleted list

getTarget() public method

public getTarget ( ) : string
return string the target window or frame to display the Web page content linked to when {@link getDisplayMode DisplayMode} is 'HyperLink' and one of the hyperlinks is clicked.

onClick() public method

This method is invoked when the {@link getDisplayMode DisplayMode} is 'LinkButton' and end-users click on one of the buttons.
public onClick ( $param )

raisePostBackEvent() public method

This method is required by {@link IPostBackEventHandler} interface. If {@link getCausesValidation CausesValidation} is true, it will invoke the page's {@link TPage::validate validate} method first. It will raise {@link onClick OnClick} events. This method is mainly used by framework and control developers.
public raisePostBackEvent ( $param )

render() public method

Renders the control.
public render ( $writer )

renderBulletText() protected method

Renders each item
protected renderBulletText ( $writer, $item, $index )

renderContents() public method

Renders the body contents.
public renderContents ( $writer )

renderHyperLinkItem() protected method

protected renderHyperLinkItem ( $writer, $item, $index )

renderLinkButtonItem() protected method

protected renderLinkButtonItem ( $writer, $item, $index )

renderTextItem() protected method

protected renderTextItem ( $writer, $item, $index )

setAutoPostBack() public method

public setAutoPostBack ( $value )

setBulletImageUrl() public method

public setBulletImageUrl ( $value )

setBulletStyle() public method

public setBulletStyle ( $value )

setDisplayMode() public method

public setDisplayMode ( $value ) : TBulletedListDisplayMode
return TBulletedListDisplayMode display mode of the list.

setFirstBulletNumber() public method

public setFirstBulletNumber ( $value )

setSelectedIndex() public method

public setSelectedIndex ( $index )

setSelectedIndices() public method

public setSelectedIndices ( $indices )

setSelectedValue() public method

public setSelectedValue ( $value )

setSelectedValues() public method

public setSelectedValues ( $values )

setTarget() public method

public setTarget ( $value )