From 99337b341f4f8c257cb033f336d3c9bb3ef398c7 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Mon, 9 May 2022 14:31:17 +0200 Subject: [PATCH] change default template to show an entity using entity_to_array --- src/core/Resources/views/admin/crud/_show.html.twig | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/core/Resources/views/admin/crud/_show.html.twig b/src/core/Resources/views/admin/crud/_show.html.twig index a769790..1c73877 100644 --- a/src/core/Resources/views/admin/crud/_show.html.twig +++ b/src/core/Resources/views/admin/crud/_show.html.twig @@ -1 +1,8 @@ -

{{ '{__toString}'|build_string(entity) }}

+
+
+ {% for item in entity_to_array(entity) %} +
{{ item.name|trans }}
+
{{ item.value }}
+ {% endfor %} +
+