{# This file is part of the Sonata package. (c) Thomas Rabaix For the full copyright and license information, please view the LICENSE file that was distributed with this source code. #} {% extends get_admin_template('base_list_field', admin.code) %} {% set is_editable = field_description.option('editable', false) and admin.hasAccess('edit', object) %} {% set x_editable_type = field_description.type|sonata_xeditable_type %} {% block field_span_attributes %} {% if is_editable and x_editable_type %} {{ parent() }} data-source="{{ field_description|sonata_xeditable_choices|json_encode }}" {% endif %} {% endblock %} {% block field %} {%- include '@SonataAdmin/CRUD/display_enum.html.twig' with { value: value, use_value: field_description.option('use_value', false), translation_domain: field_description.option('enum_translation_domain', null), } only -%} {% endblock %}