templates/bundles/SonataAdminBundle/Menu/sonata_menu.html.twig line 1

Open in your IDE?
  1. {% extends "@!SonataAdmin/Menu/sonata_menu.html.twig" %}
  2. {% block linkElement %}
  3.     {% apply spaceless %}
  4.         {%- set translation_domain = item.extra('label_catalogue', 'messages') -%}
  5.         {%- if item.extra('on_top') is defined and not item.extra('on_top') -%}
  6.             {%- set icon = item.extra('icon')|default(item.level > 1 ? 'fa fa-angle-double-right' : '')|parse_icon -%}
  7.         {%- else -%}
  8.             {%- set icon = item.extra('icon')|trans({}, 'SonataAdminBundle') -%}
  9.         {%- endif -%}
  10.         {%- set is_link = true -%}
  11.         {% import "knp_menu.html.twig" as macros %}
  12.         <a href="{{ item.uri }}"{{ macros.attributes(item.linkAttributes) }}>
  13.             {{ block('label') }}
  14.             {% if item.name == 'menu.admin.dashboard.user' %}
  15.             {{ app.user.username }}
  16.             {% endif %}
  17.         </a>
  18.     {% endapply %}
  19. {% endblock %}