Prepare Preview for new Route Bundle implemention #7867
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's in this PR?
Add a new
PreviewDefaultsProviderInterface
to decouple thePreview
Bundle from theRouteBundle
. Instead ofgetObject
a newgetDefaults
is implemented. This should also in future make it easier to create a preview for any none routable entities.Syntaxed changed and serialize and deserialized is removed. Currently the Content Bundle does always load the whole entity from Database in serialize method thats why this methods are unnecessary. Still we later could introduced a
CachablePreviewDefaultsProviderInterface
withserialize
anddeserialize
to improve performance if we want. But most performance improvements where done by not rendering the header and footer always, which is still done as the navigation queries did make most things slow. With future navigation cache maybe also that bottleneck goes away.Why?
Currently the RouteBundle is deeply integrated into the PreviewRenderer which make usage without RouteBundle hard. This also make it hard to have old and new RouteBundle side by side. So we will move step by step the preview to be independent from Route Bundle.