Цю сторінку ще не перекладено українською, тому нижче англійська версія.

stars(), stars_select() form()

A rating: stars() shows the value as stars, stars_select() lets the visitor pick one with radio stars.

form()->stars($name = '', $desc = '', $extra = [], $replace = [])
form()->stars_select($name = '', $desc = '', $extra = [], $replace = [])

Опції

ОпціяЗначення
stars, maxNumber of stars (5); value of a full row (5).
color_ok, color_ko, class, class_ok, class_koColours and classes of lit and dim stars (stars()).

Приклад

Код

return form(['rating' => 4, 'your_rating' => 3])
    ->stars('rating')
    ->stars_select('your_rating', 'Your rating');

Див. також: table/stars