src/Elements/Bundle/DemiFrontendBundle/Resources/views/Includes/priceInfoStr.html.twig line 1

Open in your IDE?
  1. {% set priceInfoStr = '' %}
  2. {% if type is same as "PerPerson" and nights == 1 %}
  3.     {% set priceInfoStr = 'demi.detail.priceinfo.per-person-per-night' | trans %}
  4. {% elseif type is same as "PerPerson" and nights > 1 %}
  5.     {% set priceInfoStr = 'demi.detail.priceinfo.per-person-per-x-nights' | trans %}
  6.     {% set priceInfoStr = priceInfoStr | replace({"[NIGHTS]" : nights})%}
  7. {% elseif type is same as "PerUnit" and nights == 1 %}
  8.     {% set priceInfoStr = 'demi.detail.priceinfo.per-unit-per-night' | trans %}
  9. {% elseif type is same as "PerUnit" and nights > 1 %}
  10.     {% set priceInfoStr = 'demi.detail.priceinfo.per-unit-per-x-nights' | trans %}
  11.     {% set priceInfoStr = priceInfoStr | replace({"[NIGHTS]" : nights})%}
  12. {% elseif type is same as "PerPerson" %}
  13.     {% set priceInfoStr = 'demi.detail.priceinfo.per-person' | trans %}
  14. {% elseif type is same as "PerUnit" %}
  15.     {% set priceInfoStr = 'demi.detail.priceinfo.per-unit' | trans %}
  16. {% elseif type is same as "Total" %}
  17.     {% set priceInfoStr = 'demi.detail.priceinfo.total' | trans %}
  18. {% endif %}
  19. {{ priceInfoStr }}