{# This file is part of the Sonata package. (c) Thomas Rabaix For the full copyright and license information, please view the LICENSE file that was distributed with this source code. #} {% extends admin.getTemplate('base_list_field') %} {% sonata_template_deprecate '@SonataAdmin/CRUD/Association/list_many_to_many.html.twig' %} {% block field%} {% if field_description.hasassociationadmin and field_description.associationadmin.hasRoute('edit') and field_description.associationadmin.isGranted('edit')%} {% for element in value%} {{ element|render_relation_element(field_description) }}{% if not loop.last %}, {% endif %} {% endfor %} {% else %} {% for element in value%} {{ element|render_relation_element(field_description) }}{% if not loop.last %}, {% endif %} {% endfor %} {% endif %} {% endblock %}