-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Draft] [Example] Integrate a webspace specific setting administration interface #106
base: master
Are you sure you want to change the base?
Conversation
->setResourceKey(WebspaceSetting::RESOURCE_KEY) | ||
->setTabTitle('app.webspace_settings') | ||
->setParent(PageAdmin::WEBSPACE_TABS_VIEW) | ||
->setOption('routerAttributesToFormRequest', ['webspace']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be get part of the createResourceTabViewBuilder
as addRouterAttributesToFormRequest
when implemented
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be get part of the
createResourceTabViewBuilder
asaddRouterAttributesToFormRequest
when implemented
Is there anything planed to get the webspace in createResourceTabViewBuilder?
THX for info
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Builder is generally for all webspaces. To get the webspace in the endpoint which this view is for you need $request->query->get('webspace');
. If you want to hide a tab you may could try use tabCondition but I'm not sure which data is available in the condition itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something is different in the admin build, so I run in a permission view error because I didn't get the webspace key with $request->query->get('webspace')
Is there any sulu js extension in the example, that is not loaded via bin/console sulu:admin:update-build
?
THX
a569388
to
52536ab
Compare
Hello @alexander-schranz In fact i set the right for my user here : After a little analyse, i think it comes from :
I made this for debug : and here are the dump : I think the #webspace# is not interpreted and i get the sulu.webspaces..settings instead of sulu.webspaces.demo.settings UPDATE :
` In WebspaceSettingController.php $request->query->get('webspace' => NULL I also dump $request->query and this i what i get : It's linking to this: #112 Thank you |
Facing the same problem here: Error: It seems that the sulu_core.webspace.webspace_manager injected in SettingsAdmin returns an empty element (only have one webspace here).
|
This is still a Draft. Until sulu/sulu#6985 is part of the core this will not work as expected yet. |
As a workaround you may can have a look at the https://github.com/bitExpert/sulu-securitytxt-bundle by @shochdoerfer to go over the FormListOverlay View. |
Don't know exactly what you mean here - I went through the sulu-securitytxt-bundle but can not see how it could help here. |
@manuxi the only thing I did was to fake it :) I made the webspace_key in my entity unique. Anytime you want to save an additional record, it will fail. That was the best implementation I could come up with. I remember I experimented a lot with the different settings and how to catch errors on the server side, but I never achieved a fully working implementation. Thus, using the table view and allowing only to save 1 element was the best alternative I could come up with. Eagerly waiting for #6985 to get merged :) |
This is not yet working as sulu/sulu#6985 is not yet part of the Sulu Core. Workaround is going over a list currently.
What's in this PR?
Create a webspace specific setting entity. To demostrate how to add a new form
TODO
Related