vendor/shopware/storefront/Resources/views/storefront/utilities/icon.html.twig line 1

Open in your IDE?
  1. {% block utilities_icon %}
        {% set styles = [ size, color, rotation, flip, class ] %}
    
        {% if pack is not defined %}
            {% set pack = 'default' %}
        {% endif %}
    
        {% if namespace is not defined %}
            {% set namespace = 'Storefront' %}
        {% endif %}
    
        {% if themeIconConfig[pack] is defined %}
            <span class="icon icon-{{ pack }} icon-{{ pack }}-{{ name }}{% for entry in styles %}{% if entry != "" %} icon-{{ entry }}{% endif %}{% endfor %}">
                {{ source('@' ~ themeIconConfig[pack].namespace ~ '/../' ~ themeIconConfig[pack].path ~'/'~ name ~ '.svg', ignore_missing = true) }}
            </span>
        {% else %}
            <span
                class="icon icon-{{ name }}{% for entry in styles %}{% if entry != "" %} icon-{{ entry }}{% endif %}{% endfor %}">
                    {{ source('@' ~ namespace ~ '/../app/storefront/dist/assets/icon/'~ pack ~'/'~ name ~'.svg', ignore_missing = true) }}
            </span>
        {% endif %}
    {% endblock %}