custom/plugins/ZweiPunktCurchod/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 themeIconConfig[pack] is defined -%}
  11.         <span class="icon icon-{{ pack }} icon-{{ pack }}-{{ name }}{% for entry in styles %}{% if entry != "" %} icon-{{ entry }}{% endif %}{% endfor %}">
  12.         {% set icon =  source('@' ~ themeIconConfig[pack].namespace ~ '/' ~ themeIconConfig[pack].path ~'/'~ name ~ '.svg', ignore_missing = true) %}
  13.             {{ icon|sw_icon_cache|raw }}
  14.     </span>
  15.     {%- else -%}
  16.         <span class="icon icon-{{ name }}{% for entry in styles %}{% if entry != "" %} icon-{{ entry }}{% endif %}{% endfor %}">
  17.         {% set icon = source('@' ~ namespace ~ '/assets/icon/'~ pack ~'/'~ name ~'.svg', ignore_missing = true) %}
  18.             {{ icon|sw_icon_cache|raw }}
  19.     </span>
  20.     {%- endif -%}
  21. {% endblock %}