Skip to content

Commit

Permalink
Merge branch '1.5'
Browse files Browse the repository at this point in the history
* 1.5:
  Use flags macro
  Use flags macro
  Use flags macro
  Better matching of country for locale
  Add filter to get country for locale
  Skip test if HWIOAuthBundle is not installed
  Update test_services.xml
  • Loading branch information
pamil committed Jul 26, 2019
2 parents a0017c4 + 5a3f78f commit ceac2b7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Resources/views/Macro/flags.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,10 @@

{% macro fromLocaleCode(locale_code) %}
{% import _self as flags %}
{{ flags.fromCountryCode(locale_code|slice(-2)) }}
{% endmacro %}

{% set country_code = locale_code|sylius_locale_country %}

{% if country_code %}
{{ flags.fromCountryCode(country_code) }}
{% endif %}
{% endmacro %}

0 comments on commit ceac2b7

Please sign in to comment.