fivestar-formatter-percentage.html.twig in Fivestar 8
Default theme implementation for the Fivestar percentage formatter.
Available variables
- average: The average rating, expressed as an integer from 0 to 100.
1 theme call to fivestar-formatter-percentage.html.twig
- PercentageFormatter::viewElements in src/
Plugin/ Field/ FieldFormatter/ PercentageFormatter.php - Builds a renderable array for a field value.
File
templates/fivestar-formatter-percentage.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation for the Fivestar percentage formatter.
- *
- * Available variables
- * - average: The average rating, expressed as an integer from 0 to 100.
- *
- * @see template_preprocess_fivestar_formatter_percentage()
- *
- * @ingroup themeable
- */
- #}
- <span class="fivestar-percentage">{{ average ~ '%' }}</span>