PHP Class Prado\Web\UI\WebControls\TRatingList

This class is EXPERIMENTAL.
Since: 3.0
Inheritance: extends TRadioButtonList
Afficher le fichier Open project: pradosoft/prado Class Usage Examples

Méthodes publiques

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

Méthodes protégées

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

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

getAllowInput() public méthode

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

getAssetUrl() protected méthode

protected getAssetUrl ( $file = '' ) : string
Résultat string asset file url.

getCaption() public méthode

public getCaption ( ) : string
Résultat string caption text. Default is "Rate It:".

getCaptionControl() protected méthode

protected getCaptionControl ( )

getCaptionControlID() protected méthode

protected getCaptionControlID ( ) : string
Résultat string find the client ID of the caption control.

getCaptionID() public méthode

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

getClientClassName() protected méthode

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

getHalfRatingInterval() public méthode

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

getPostBackOptions() protected méthode

protected getPostBackOptions ( ) : array
Résultat array list of post back options.

getRating() public méthode

public getRating ( ) : float
Résultat float rating value.

getRatingIndex() protected méthode

protected getRatingIndex ( $rating ) : integer
Résultat integer rating as integer

getRatingStyle() public méthode

public getRatingStyle ( ) : TRatingListStyle
Résultat TRatingListStyle current rating style

getRatingStyleCssClass() protected méthode

protected getRatingStyleCssClass ( ) : string
Résultat string rating style css class name.

getReadOnly() public méthode

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

onPreRender() public méthode

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

onSelectedIndexChanged() public méthode

public onSelectedIndexChanged ( $param )

publishImages() protected méthode

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

publishStyle() protected méthode

protected publishStyle ( $style ) : string
Résultat string URL of the css style file

registerClientScript() protected méthode

Registers the relevant JavaScript.
protected registerClientScript ( )

render() public méthode

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

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

setCaption() public méthode

public setCaption ( $value ) : TRatingListStyle
Résultat TRatingListStyle current rating style

setCaptionID() public méthode

public setCaptionID ( $value )

setEnabled() public méthode

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

setHalfRatingInterval() public méthode

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

setRating() public méthode

public setRating ( $value )

setRatingStyle() public méthode

public setRatingStyle ( $value )

setReadOnly() public méthode

public setReadOnly ( $value )

setRepeatLayout() public méthode

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

setSelectedIndex() public méthode

public setSelectedIndex ( $value )