-
-
Notifications
You must be signed in to change notification settings - Fork 208
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
Verify that blocks implements EditableBlockService to add/edit them. #1624
Verify that blocks implements EditableBlockService to add/edit them. #1624
Conversation
f284009
to
aa77aeb
Compare
Needs #1623 first. |
Could you please rebase your PR and fix merge conflicts? |
aa77aeb
to
e662e16
Compare
foreach ($blockServices as $code => $blockService) { | ||
if ($blockService instanceof EditableBlockService) { | ||
continue; | ||
} | ||
|
||
unset($blockServices[$code]); | ||
} |
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.
We're doing this logic at least twice.
Would it make sens to add/modify a method in BlockServiceManager then ?
If most of the time/always we need to work on EditableBlockService only in PageBundle, it might make sens.
WDYT ?
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.
BlockServiceManager is from block-bundle, how could we handle this change?
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.
I was wondering if we should introduce an EditableBlockServiceManager in BlockBundle then.
Or introduce getEditableService and getEditableServiceByContext...
But this solution is currently the only one we have
Should we merge this or wait for another solution? @VincentLanglet ? |
I'm ok merging this:
The only question would be, would it be useful to provide something in the BlockBundle to avoid this extra code ; if yes we might create a feature request. |
Check this comment about my thoughts about the implementation: #1621 (comment) |
Subject
I am targeting this branch, because this becomes a problem on 4.x since block bundle splitted interfaces.
Closes #1621
Changelog