PHP Class Prado\Web\UI\WebControls\TRatingList

This class is EXPERIMENTAL.
Since: 3.0
Inheritance: extends TRadioButtonList
Mostra file Open project: pradosoft/prado Class Usage Examples

Public Methods

Method Description
__construct ( ) Sets the default repeat direction to horizontal.
getAllowInput ( ) : boolean Wrapper for {@link setReadOnly ReadOnly} property.
getCaption ( ) : string
getCaptionID ( ) : string
getHalfRatingInterval ( ) : array
getRating ( ) : float
getRatingStyle ( ) : TRatingListStyle
getReadOnly ( ) : boolean
onPreRender ( $param ) Publish the the rating style css file and rating image files.
onSelectedIndexChanged ( $param )
render ( $writer ) Add rating style class name to the class attribute when {@link setReadOnly ReadOnly} property is true and when the {@link setCssClass CssClass} property is empty.
setAllowInput ( $value ) Wrapper for {@link setReadOnly ReadOnly} property.
setCaption ( $value ) : TRatingListStyle
setCaptionID ( $value )
setEnabled ( $value ) Wrapper for {@link setReadOnly ReadOnly} property.
setHalfRatingInterval ( $value ) Sets the interval such that those rating values within the interval will be considered as a half star rating.
setRating ( $value )
setRatingStyle ( $value )
setReadOnly ( $value )
setRepeatLayout ( $value ) The repeat layout must be Table.
setSelectedIndex ( $value )

Protected Methods

Method Description
getAssetUrl ( $file = '' ) : string
getCaptionControl ( )
getCaptionControlID ( ) : string
getClientClassName ( ) : string Gets the name of the javascript class responsible for performing postback for this control.
getPostBackOptions ( ) : array
getRatingIndex ( $rating ) : integer
getRatingStyleCssClass ( ) : string
publishImages ( $style, $fileExt = '.gif' ) : array
publishStyle ( $style ) : string
registerClientScript ( ) Registers the relevant JavaScript.

Method Details

__construct() public method

Sets the default repeat direction to horizontal.
public __construct ( )

getAllowInput() public method

Wrapper for {@link setReadOnly ReadOnly} property.
public getAllowInput ( ) : boolean
return boolean whether the rating list can be edited. Defaults to true.

getAssetUrl() protected method

protected getAssetUrl ( $file = '' ) : string
return string asset file url.

getCaption() public method

public getCaption ( ) : string
return string caption text. Default is "Rate It:".

getCaptionControl() protected method

protected getCaptionControl ( )

getCaptionControlID() protected method

protected getCaptionControlID ( ) : string
return string find the client ID of the caption control.

getCaptionID() public method

public getCaptionID ( ) : string
return string control or html element ID for displaying a caption.

getClientClassName() protected method

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

getHalfRatingInterval() public method

public getHalfRatingInterval ( ) : array
return array rating display half value interval, default is array(0.3, 0.7);

getPostBackOptions() protected method

protected getPostBackOptions ( ) : array
return array list of post back options.

getRating() public method

public getRating ( ) : float
return float rating value.

getRatingIndex() protected method

protected getRatingIndex ( $rating ) : integer
return integer rating as integer

getRatingStyle() public method

public getRatingStyle ( ) : TRatingListStyle
return TRatingListStyle current rating style

getRatingStyleCssClass() protected method

protected getRatingStyleCssClass ( ) : string
return string rating style css class name.

getReadOnly() public method

public getReadOnly ( ) : boolean
return boolean whether the items in the column can be edited. Defaults to false.

onPreRender() public method

Publish the the rating style css file and rating image files.
public onPreRender ( $param )

onSelectedIndexChanged() public method

public onSelectedIndexChanged ( $param )

publishImages() protected method

protected publishImages ( $style, $fileExt = '.gif' ) : array
return array URL of publish the rating images

publishStyle() protected method

protected publishStyle ( $style ) : string
return string URL of the css style file

registerClientScript() protected method

Registers the relevant JavaScript.
protected registerClientScript ( )

render() public method

Add rating style class name to the class attribute when {@link setReadOnly ReadOnly} property is true and when the {@link setCssClass CssClass} property is empty.
public render ( $writer )

setAllowInput() public method

Wrapper for {@link setReadOnly ReadOnly} property.
public setAllowInput ( $value )

setCaption() public method

public setCaption ( $value ) : TRatingListStyle
return TRatingListStyle current rating style

setCaptionID() public method

public setCaptionID ( $value )

setEnabled() public method

Wrapper for {@link setReadOnly ReadOnly} property.
public setEnabled ( $value )

setHalfRatingInterval() public method

Sets the interval such that those rating values within the interval will be considered as a half star rating.
public setHalfRatingInterval ( $value )

setRating() public method

public setRating ( $value )

setRatingStyle() public method

public setRatingStyle ( $value )

setReadOnly() public method

public setReadOnly ( $value )

setRepeatLayout() public method

The repeat layout must be Table.
public setRepeatLayout ( $value )

setSelectedIndex() public method

public setSelectedIndex ( $value )