{# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #} {# @var field \EasyCorp\Bundle\EasyAdminBundle\Dto\FieldDto #} {# @var entity \EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto #} {# this is a bit ugly, but Twig doesn't have a 'is numeric' test #} {% if field.formattedValue is iterable %} {% for item in field.formattedValue %} <span class="badge badge-secondary">{{ item }}</span> {% endfor %} {% else %} {{ field.formattedValue }} {% endif %}