office-hours-status.html.twig in Office Hours 8
<div class="office-hours-status office-hours-status--{% if is_open %}open{% else %}closed{% endif %}"> {% if is_open %} {{ open_text }} {% else %} {{ closed_text }} {% endif %} </div>
1 theme call to office-hours-status.html.twig
- OfficeHoursFormatterStatus::viewElements in src/
Plugin/ Field/ FieldFormatter/ OfficeHoursFormatterStatus.php - Builds a renderable array for a field value.
File
templates/office-hours-status.html.twigView source
- <div class="office-hours-status office-hours-status--{% if is_open %}open{% else %}closed{% endif %}">
- {% if is_open %}
- {{ open_text }}
- {% else %}
- {{ closed_text }}
- {% endif %}
- </div>