{% extends '@SonataAdmin/CRUD/base_list_field.html.twig' %}

{% block field %}
{% if object is defined %}

    <tr class="sonata-ba-view-container">
        <th>Klasy</th>
        <td>
            {%  if attribute(object, 'groupsName') is not empty %}
                {% set groupsList = attribute(object, 'groupsName') %}
                {{ groupsList|replace({'||||': ', ', '||': ''}) }}
            {% endif %}
        </td>
    </tr>
            
{% endif %}
{% endblock %}