custom/plugins/WynTheme/src/Resources/views/storefront/utilities/icon.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/utilities/icon.html.twig' %}
  2. {% block utilities_icon %}
  3.   {% set styles = [ size, color, rotation, flip, class ] %}
  4.   {% if pack is not defined %}
  5.     {% set pack = 'default' %}
  6.   {% endif %}
  7.   {% if namespace is not defined %}
  8.     {% set namespace = 'Storefront' %}
  9.   {% endif %}
  10.   {% if theme_config('wyn-iconset') %}
  11.     {% set iconPath = theme_config('wyn-iconset') %}
  12.     {% set wynNamespace = 'WynTheme' %}
  13.     {% set wynNamespaceExtension = 'WynCustomerTheme' %}
  14.     {% if source('@' ~ wynNamespace ~ '/../app/storefront/dist/assets/icon/'~ iconPath ~'/'~ name ~'.svg', ignore_missing = true) %}
  15.       {% set pack = iconPath %}
  16.       {% set namespace = wynNamespace %}
  17.     {% elseif source('@' ~ wynNamespaceExtension ~ '/../app/storefront/dist/assets/icon/'~ iconPath ~'/'~ name ~'.svg', ignore_missing = true) %}
  18.       {% set pack = iconPath %}
  19.       {% set namespace = wynNamespaceExtension %}
  20.     {% endif %}
  21.   {% endif %}
  22.   <span
  23.     class="icon icon-{{ name }}{% for entry in styles %}{% if entry != "" %} icon-{{ entry }}{% endif %}{% endfor %}"
  24.     {% if slotAttr %}slot="{{ slotAttr }}"{% endif %}
  25.   >
  26.     {{ source('@' ~ namespace ~ '/../app/storefront/dist/assets/icon/'~ pack ~'/'~ name ~'.svg', ignore_missing = true) }}
  27.   </span>
  28. {% endblock %}