I'm trying to determine the feasibility and effort for a client request. When a rendering is removed from a layout via the presentation details, they want all child renderings to also be removed to avoid having orphaned renderings in the layout. (ie. renderings in placeholders of the rendering being removed, recursively).
So, it seems feasible to look at a rendering, determine its placeholders and find renderings within those, and remove them as well.
However, what I can't figure out is when to initiate this. Is there a pipeline I am not seeing that fires when a rendering is removed?
Maybe I need to rethink the approach and remove orphaned renderings when an item is saved?