{# 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. #} {% macro render_form(form, permissions, td_type, admin, admin_pool, object) %}
{{ include('SonataAdminBundle:Helper:render_form_dismissable_errors.html.twig') }}
{% for permission in permissions %} {% endfor %} {% for child in form.children if child.vars.name != '_token' %} {% if loop.index0 == 0 or loop.index0 % 10 == 0 %} {% for permission in permissions %} {% endfor %} {% endif %} {% for permission in permissions %} {% endfor %} {% endfor %}
{{ td_type|trans({}, 'SonataAdminBundle') }}{{ permission }}
{% set typeChild = child['role'] is defined ? child['role'] : child['user'] %} {{ typeChild.vars.value }} {{ form_widget(typeChild) }} {{ form_widget(child[permission], { label: false }) }}
{{ form_row(form._token) }}
{% endmacro %}