sonata-project / SonataPageBundle

This bundle provides a Site and Page management through container and block services
https://docs.sonata-project.org/projects/SonataPageBundle
MIT License
219 stars 210 forks source link

If Block does not implement EditableBlockService don't show it in composer #1621

Closed haivala closed 2 years ago

haivala commented 2 years ago

Feature Request

If Block does not implement EditableBlockService don't show it in page composer as it only triggers errors.

haivala commented 2 years ago

In BlockAdmin the block that does not implement EditableBlockService should be shown but it should be indicated somehow that it cannot be used?

eerison commented 2 years ago

@haivala could you confirm if jordi's PR fixed your issue, if yes could you close?

haivala commented 2 years ago

@eerison yes it fixed it!

@jordisala1991 & @VincentLanglet You were taking about the implementation: I think that the "old way" would be still good: Make block maker define block setting that is the block context as an array but this time it would need proper documentation. if it has sonata_page_block then show it in the page composer and BlockAdmin. I'm only aware that there is another context admin that makes sure that the block is only used in SonataAdmin like in the dashboard.