recipe-duration.html.twig in Recipe 8.2
Theme for recipe duration markup.
Available variables:
- hours: The amount of hours in the time duration.
- minutes: The amount of minutes in the time duration.
See also
2 theme calls to recipe-duration.html.twig
- RecipeDurationFormatter::viewElements in src/
Plugin/ Field/ FieldFormatter/ RecipeDurationFormatter.php - Builds a renderable array for a field value.
- recipe_build_total_time in ./
recipe.module
File
templates/recipe-duration.html.twigView source
- {#
- /**
- * @file
- * Theme for recipe duration markup.
- *
- * Available variables:
- * - hours: The amount of hours in the time duration.
- * - minutes: The amount of minutes in the time duration.
- *
- * @see template_preprocess_recipe_duration()
- */
- #}
-
- {% if hours and minutes %}
- {{ hours }}, {{ minutes }}
- {% elseif hours %}
- {{ hours }}
- {% else %}
- {{ minutes }}
- {% endif %}