{% extends '@SonataAdmin/CRUD/Association/list_many_to_many.html.twig' %}
{% block relation_value %}
    {{- element|render_relation_element(field_description) -}}
    ( test )
{% endblock %}
{% block relation_link %}
    <a href="{{ field_description.associationadmin.generateObjectUrl(route_name, element, field_description.options.route.parameters) }}">
        {{- element|render_relation_element(field_description) -}}
    </a>
    {% set cotisEnd = isCotisationValidForAdherent(element.adherent) %}
    {% if false != cotisEnd %}
        <span class="label label-success">{{ cotisEnd|date('d/m/Y') }}</span>
    {% else %}
        <span class="label label-danger">non</span>
    {% endif %}
{% endblock %}
