From 922912a7e08b8413edbd5887805425a18b731aee Mon Sep 17 00:00:00 2001 From: Kamil Grygierzec Date: Tue, 15 Oct 2024 08:55:09 +0200 Subject: [PATCH] [Zone] add priorities to twig hooks --- .../Resources/config/app/twig_hooks/zone/create.yaml | 9 +++++++++ .../Resources/config/app/twig_hooks/zone/update.yaml | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/zone/create.yaml b/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/zone/create.yaml index ea96476abb29..626d97768183 100644 --- a/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/zone/create.yaml +++ b/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/zone/create.yaml @@ -8,29 +8,38 @@ sylius_twig_hooks: type: '@=_context.resource.getType()' form: '@=_context.form' template: '@SyliusAdmin/zone/form.html.twig' + priority: 0 'sylius_admin.zone.create.content.form': sections: template: '@SyliusAdmin/zone/form/sections.html.twig' + priority: 0 'sylius_admin.zone.create.content.form.sections': general: template: '@SyliusAdmin/zone/form/sections/general.html.twig' + priority: 100 members: template: '@SyliusAdmin/zone/form/sections/members.html.twig' + priority: 0 'sylius_admin.zone.create.content.form.sections.members': member: template: '@SyliusAdmin/zone/form/sections/members/member.html.twig' + priority: 0 'sylius_admin.zone.create.content.form.sections.general': default: enabled: false code: template: '@SyliusAdmin/zone/form/sections/general/code.html.twig' + priority: 300 type: template: '@SyliusAdmin/zone/form/sections/general/type.html.twig' + priority: 200 name: template: '@SyliusAdmin/zone/form/sections/general/name.html.twig' + priority: 100 scope: template: '@SyliusAdmin/zone/form/sections/general/scope.html.twig' + priority: 0 diff --git a/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/zone/update.yaml b/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/zone/update.yaml index be468adca019..80ea9b0f188a 100644 --- a/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/zone/update.yaml +++ b/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/zone/update.yaml @@ -10,29 +10,38 @@ sylius_twig_hooks: template: '@SyliusAdmin/zone/form.html.twig' configuration: method: 'PUT' + priority: 0 'sylius_admin.zone.update.content.form': sections: template: '@SyliusAdmin/zone/form/sections.html.twig' + priority: 0 'sylius_admin.zone.update.content.form.sections': general: template: '@SyliusAdmin/zone/form/sections/general.html.twig' + priority: 100 members: template: '@SyliusAdmin/zone/form/sections/members.html.twig' + priority: 0 'sylius_admin.zone.update.content.form.sections.members': member: template: '@SyliusAdmin/zone/form/sections/members/member.html.twig' + priority: 0 'sylius_admin.zone.update.content.form.sections.general': default: enabled: false code: template: '@SyliusAdmin/zone/form/sections/general/code.html.twig' + priority: 300 type: template: '@SyliusAdmin/zone/form/sections/general/type.html.twig' + priority: 200 name: template: '@SyliusAdmin/zone/form/sections/general/name.html.twig' + priority: 100 scope: template: '@SyliusAdmin/zone/form/sections/general/scope.html.twig' + priority: 0