custom/plugins/SwagPlatformSecurity/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.     {% if swagSecurity.isActive('NEXT-23562') %}
  4.         {% set styles = [ size, color, rotation, flip, class ] %}
  5.         {%- if pack is not defined -%}
  6.             {% set pack = 'default' %}
  7.         {%- endif -%}
  8.         {%- if namespace is not defined -%}
  9.             {% set namespace = 'Storefront' %}
  10.         {%- endif -%}
  11.         {%- if themeIconConfig[pack] is defined -%}
  12.             <span class="icon icon-{{ pack }} icon-{{ pack }}-{{ name }}{% for entry in styles %}{% if entry != "" %} icon-{{ entry }}{% endif %}{% endfor %}">
  13.             {% set icon =  source('@' ~ themeIconConfig[pack].namespace ~ '/' ~ themeIconConfig[pack].path ~'/'~ name ~ '.svg', ignore_missing = true) %}
  14.                 {{ icon|raw }}
  15.         </span>
  16.         {%- else -%}
  17.             <span class="icon icon-{{ name }}{% for entry in styles %}{% if entry != "" %} icon-{{ entry }}{% endif %}{% endfor %}">
  18.             {% set icon = source('@' ~ namespace ~ '/app/storefront/dist/assets/icon/'~ pack ~'/'~ name ~'.svg', ignore_missing = true) %}
  19.                 {{ icon|raw }}
  20.         </span>
  21.         {%- endif -%}
  22.     {% else %}
  23.         {{ parent() }}
  24.     {% endif %}
  25. {%- endblock -%}