gallery.html.twig 442B

12345678910
  1. {# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #}
  2. {# @var field \EasyCorp\Bundle\EasyAdminBundle\Dto\FieldDto #}
  3. {# @var entity \EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto #}
  4. {# this is a bit ugly, but Twig doesn't have a 'is numeric' test #}
  5. {% if field.formattedValue matches '/^\\d+$/' %}
  6. <span class="badge badge-secondary">{{ field.formattedValue }}</span>
  7. {% else %}
  8. {{ field.formattedValue }}
  9. {% endif %}