From 0e14ef2082a8734f1837cec3247a768deb9fc0d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20CROMBEZ?= <777666+jcrombez@users.noreply.github.com> Date: Mon, 20 Nov 2023 14:22:44 +0000 Subject: [PATCH] add helper trait to build filter form --- src/Controller/DatagridControllerHelper.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/Controller/DatagridControllerHelper.php diff --git a/src/Controller/DatagridControllerHelper.php b/src/Controller/DatagridControllerHelper.php new file mode 100644 index 0000000..712e5e0 --- /dev/null +++ b/src/Controller/DatagridControllerHelper.php @@ -0,0 +1,16 @@ +container->get('form.factory')->createNamedBuilder($name, options: [ + 'method' => $method, + 'csrf_protection' => $csrfProtection, + ]); + } +}