Prado\Web\UI\WebControls\TRatingList::getRating PHP Method

getRating() public method

public getRating ( ) : float
return float rating value.
    public function getRating()
    {
        $rating = $this->getViewState('Rating', null);
        if ($rating === null) {
            return $this->getSelectedIndex() + 1;
        } else {
            return $rating;
        }
    }

Usage Example

Beispiel #1
0
 /**
  * @param float rating value, also sets the selected Index
  */
 public function setRating($value)
 {
     if (parent::getRating() === $value) {
         return;
     }
     parent::setRating($value);
     $value = $this->getRating();
     $this->callClientFunction('setRating', $value);
 }