base_array_macro.html.twig 589 B

1234567891011121314151617181920212223
  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, inline) %}
  8. {% for key, val in value %}
  9. {% if val is iterable %}
  10. [{{ key }} => {{ _self.render_array(val, inline) }}]
  11. {% else %}
  12. [{{ key }} => {{ val }}]
  13. {% endif %}
  14. {% if not loop.last and not inline %}
  15. <br>
  16. {% endif %}
  17. {% endfor %}
  18. {% endmacro %}