From 2a36aebc63bfe05d8dd4c47b424862266976edb9 Mon Sep 17 00:00:00 2001 From: Matthias Seghers <19349429+matthiasseghers@users.noreply.github.com> Date: Thu, 13 Apr 2023 15:20:39 +0200 Subject: [PATCH 1/2] Add deprecation notice --- cookbook/securing-your-application.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cookbook/securing-your-application.rst b/cookbook/securing-your-application.rst index 13f1bf80..c7fae123 100644 --- a/cookbook/securing-your-application.rst +++ b/cookbook/securing-your-application.rst @@ -187,6 +187,10 @@ needs some updating. You can add the permission tab as shown below: } } +.. note:: + + The usage of the ``setRequestParameters`` method in the FormViewBuilder is deprecated. Please use ``addRequestParameters`` instead. + The important option here is set in the ``setRequestParameters`` call, which defines for which resource this permission form is used. In order for that to work the relation between the ``resourceKey`` and the security context and the From ad479335027289129b6061f43fdade8aeab8f1ba Mon Sep 17 00:00:00 2001 From: Matthias Seghers <19349429+matthiasseghers@users.noreply.github.com> Date: Fri, 14 Apr 2023 14:41:24 +0200 Subject: [PATCH 2/2] The usage of the setRequestParameters method in the FormViewBuilder is deprecated. --- cookbook/securing-your-application.rst | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cookbook/securing-your-application.rst b/cookbook/securing-your-application.rst index c7fae123..eaa96af2 100644 --- a/cookbook/securing-your-application.rst +++ b/cookbook/securing-your-application.rst @@ -178,7 +178,7 @@ needs some updating. You can add the permission tab as shown below: ->createFormViewBuilder('sulu_example.edit_form.permissions', '/permissions') ->setResourceKey('permissions') ->setFormKey('permission_details') - ->setRequestParameters(['resourceKey' => 'example']) + ->addRequestParameters(['resourceKey' => 'example']) ->setTabCondition('_permissions.security') ->setTabTitle('sulu_security.permissions') ->addToolbarActions([new ToolbarAction('sulu_admin.save')]) @@ -187,11 +187,7 @@ needs some updating. You can add the permission tab as shown below: } } -.. note:: - - The usage of the ``setRequestParameters`` method in the FormViewBuilder is deprecated. Please use ``addRequestParameters`` instead. - -The important option here is set in the ``setRequestParameters`` call, which +The important option here is set in the ``addRequestParameters`` call, which defines for which resource this permission form is used. In order for that to work the relation between the ``resourceKey`` and the security context and the security class has to be configured: