-
Notifications
You must be signed in to change notification settings - Fork 32
should we cascade deletion of routes / menu entries when content is deleted? #98
Comments
I think it is important to clean things up after deleting. And i would wish a route/menu to be deleted, when a content was deleted. |
i don't think we should cascade. i fear this maybe need a checkbox or something to manually trigger the cascade. |
if there is a way to add behaviour to the delete confirmation dialog, we could make the admin extension for routes add such a checkbox to the delete confirmation. and if its checked, continue with deletion. @rande can an extension somehow change the delete confirmation dialog (or the button area at the bottom for save / delete) and add a checkbox? |
@dbu The extension is not that magic ;) You can probably use an extension to update the default controller. But this will be not ideal. |
thanks thomas. then i guess we can either provide a controller that people can manually use or that the extension automatically puts there if the admin did not specify a non-default controller. the later sounds a bit funny but doable. as soon as somebody is doing their own controller, they would have to take the route deletion part into their own hands. but what about an extension aware controller? sounds like a stupid idea or doable? maybe with a ControllerExtensionInterface? i also see need to update other parts outside the form itself, for example for symfony-cmf/core-bundle#121 |
a solution might be to use some events in tje controller or in the admin. But adding too much events might kill performance. Thomas Rabaix
|
the dangerous part about that cascading is that deleting that route will also delete all children routes, which could be a really bad idea. (unless your content tree and route tree have the same structure, which would mean that by deleting the content, you delete its children anyways which would be associated with the routes you delete because they are children of the route. confused yet?)
The text was updated successfully, but these errors were encountered: