list_array.html.twig 613 B

12345678910111213141516171819202122232425
  1. {#
  2. This file is part of the Sonata package.
  3. (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
  4. For the full copyright and license information, please view the LICENSE
  5. file that was distributed with this source code.
  6. #}
  7. {% macro render_array(value) %}
  8. {% for key, val in value %}
  9. {% if val is iterable %}
  10. [{{ key }} => {{ _self.render_array(val) }}}]
  11. {% else %}
  12. [{{ key }} => {{ val }}]
  13. {% endif %}
  14. {% endfor %}
  15. {% endmacro %}
  16. {% extends admin.getTemplate('base_list_field') %}
  17. {% block field %}
  18. {{ _self.render_array(value) }}
  19. {% endblock %}