vendor/sonata-project/admin-bundle/src/Resources/views/Breadcrumb/breadcrumb.html.twig line 1

Open in your IDE?
  1. {% apply spaceless %}
  2. {% for menu in items %}
  3.     {%- set translation_domain = menu.extra('translation_domain', 'messages') -%}
  4.     {# We use method accessor instead of ".label" since `menu` implements `ArrayAccess` and could have a property called "label". #}
  5.     {%- set label = menu.getLabel() -%}
  6.     {%- if translation_domain is not same as(false) -%}
  7.         {%- set label = label|trans(menu.extra('translation_params', {}), translation_domain) -%}
  8.     {%- endif -%}
  9.     {% if not loop.last %}
  10.         <li>
  11.             {% if menu.uri is not empty %}
  12.                 <a href="{{ menu.uri }}">
  13.                     {% if menu.extra('safe_label', true) %}
  14.                         {{- label|raw -}}
  15.                     {% else %}
  16.                         {{- label|u.truncate(100, '...') -}}
  17.                     {% endif %}
  18.                 </a>
  19.             {% else %}
  20.                 <span>{{ label|u.truncate(100, '...') }}</span>
  21.             {% endif %}
  22.         </li>
  23.     {% else %}
  24.         <li class="active"><span>{{ label|u.truncate(100, '...') }}</span></li>
  25.     {% endif %}
  26. {% endfor %}
  27. {% endapply %}