{# @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 %} {% if field.htmlAttributes.image is defined %} {{ include('@!EasyAdmin/crud/field/image.html.twig') }} {% else %} {% for value in field.formattedValue %} {{ value }} {% endfor %} {% endif %} {% elseif field.formattedValue matches '/^\\d+$/' %} {{ field.formattedValue }} {% else %} {{ field.formattedValue }} {% endif %}