Sonata custom action return always integer in list field

Viewed 15

I use SonataAdminBundleversion 3.68 and i have an error within the custom action in list field.

$listMapper->add('Actions', 'HTML', ['template' => 'bundles\SonataBundle\reset_password.html.twig']);

{% extends '@SonataAdmin/CRUD/base_list_field.html.twig' %}

{% block field %}
    <a class="btn btn-primary" href="{{ object.id }}">Reinit. password</a>
{% endblock %}

But in list view, field value is aways an integer with the same value of id column.

Thanks in advance for your help.

Goo day Jérémy

0 Answers
Related