Skip to content

Commit 12138be

Browse files
author
Florian Eckerstorfer
committed
Merge pull request #403 from benr77/benr77-patch-1
Fix deprecation warnings
2 parents b5d649d + 424916f commit 12138be

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

Resources/views/Menu/bootstrap.html.twig

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
{%- endfor -%}
99
{% endmacro %}
1010

11+
{% from _self import attributes as attributes %}
12+
1113
{% block compressed_root %}
1214
{% spaceless %}
1315
{{ block('root') }}
@@ -63,7 +65,7 @@
6365

6466
{% set listAttributes = listAttributes|merge({'class': (listAttributes.class|default('') ~ ' ' ~ listClass)|trim}) %}
6567

66-
<ul{{ _self.attributes(listAttributes) }}>
68+
<ul{{ attributes(listAttributes) }}>
6769
{{ block('children') }}
6870
</ul>
6971
{% endif %}
@@ -73,7 +75,7 @@
7375
{% spaceless %}
7476
{% if item.hasChildren and options.depth is not same as (0) and ((item.extras.dropdown is not defined and item.displayChildren is same as (true) or item.extras.dropdown is defined and item.extras.dropdown is same as (true) and item.displayChildren is same as (true))) %}
7577
{% set listAttributes = listAttributes|merge({'class': (listAttributes.class|default('') ~ ' dropdown-menu')|trim}) %}
76-
<ul{{ _self.attributes(listAttributes) }}>
78+
<ul{{ attributes(listAttributes) }}>
7779
{{ block('children') }}
7880
</ul>
7981
{% endif %}
@@ -83,7 +85,7 @@
8385
{% block listList %}
8486
{% spaceless %}
8587
{% if item.hasChildren and options.depth is not same as (0) and item.displayChildren %}
86-
<ul{{ _self.attributes(listAttributes) }}>
88+
<ul{{ attributes(listAttributes) }}>
8789
{{ block('children') }}
8890
</ul>
8991
{% endif %}
@@ -140,7 +142,7 @@
140142
{%- set attributes = attributes|merge({'class': classes|join(' ')}) %}
141143
{%- endif %}
142144
{# displaying the item #}
143-
<li{{ _self.attributes(attributes) }}>
145+
<li{{ attributes(attributes) }}>
144146
{%- if attributes.divider is defined and attributes.divider is not empty %}
145147
{%- elseif item.hasChildren and options.style is defined and options.style in ['tabs', 'justified-tabs', 'pills', 'justified-pills', 'navbar', 'navbar-right', 'navbar_justified'] and options.currentDepth is same as (1) and ((item.extras.dropdown is not defined and item.displayChildren is same as (true) or item.extras.dropdown is defined and item.extras.dropdown is same as (true) and item.displayChildren is same as (true))) %}
146148
{{ block('dropdownElement') }}
@@ -168,14 +170,14 @@
168170
{% endif %}
169171
{% endblock %}
170172

171-
{% block linkElement %}<a href="{{ item.uri }}"{{ _self.attributes(item.linkAttributes) }}>{{ block('label') }}</a>{% endblock %}
173+
{% block linkElement %}<a href="{{ item.uri }}"{{ attributes(item.linkAttributes) }}>{{ block('label') }}</a>{% endblock %}
172174

173175
{% block dropdownElement %}
174176
{% spaceless %}
175177
{% set labelAttributes = item.labelAttributes %}
176178
{% set labelAttributes = labelAttributes|merge({'class': (labelAttributes.class|default('') ~ ' dropdown-toggle')|trim}) %}
177179
{% set labelAttributes = labelAttributes|merge({'data-toggle': 'dropdown'}) %}
178-
<a href="#"{{ _self.attributes(labelAttributes) }}>{{ block('label') }} <b class="caret"></b></a>
180+
<a href="#"{{ attributes(labelAttributes) }}>{{ block('label') }} <b class="caret"></b></a>
179181
{% endspaceless %}
180182
{% endblock dropdownElement %}
181183

@@ -184,6 +186,6 @@
184186
{% endspaceless %}
185187
{% endblock dividerElement %}
186188

187-
{% block spanElement %}<span{{ _self.attributes(item.labelAttributes) }}>{{ block('label') }}</span>{% endblock %}
189+
{% block spanElement %}<span{{ attributes(item.labelAttributes) }}>{{ block('label') }}</span>{% endblock %}
188190

189191
{% block label %}{% if options.allow_safe_labels and item.getExtra('safe_label', false) %}{{ item.label|raw|parse_icons }}{% else %}{{ item.label|parse_icons }}{% endif %}{% endblock %}

0 commit comments

Comments
 (0)