-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
Create new Breadcrumb interface #398
Conversation
src/Breadcrumb.php
Outdated
|
||
use Sonata\BlockBundle\Block\Service\BlockServiceInterface; | ||
|
||
interface Breadcrumb extends BlockServiceInterface |
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 must extend the BlockServiceInterface
, because we must pass a valid block service here:
https://github.com/sonata-project/SonataSeoBundle/pull/398/files#diff-eb4c49edd518cf23ec8cccf9141b23f1R69
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.
WDYT about create breadcrumb Block without interface? We can inject menu and menu leaf. Parents road will be new breadcrumb menu. Core menu will work as roadmap.
If I got you right, you prefer an We got the actual problem that we overused inheritance for breadcrumbs. |
0a725c9
to
fbf780e
Compare
I prefer using one final class with advance configuration. User should inject menu builded on knp-menu. Current uri will tell wich leaf id used. Taking parents we can build breadcrumb. In PageBundle we can go Evans farder. Create sidemap menu and inject it to this Block. |
Can you give an example how this will work with At the moment we have many breadcrumbs that are registered. We use the |
fbf780e
to
79b5b9c
Compare
Please review @sonata-project/contributors |
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.
Breadcrumb lr breadcrumb interface depending on the sonata standard ?
Do you mean the |
Yes, there was already a discussion about this and some classes have the suffix but some others doesn’t. It’s a symfony standard but not a communicated sonata one. That’s why I approved the PR |
Maybe some other @sonata-project/contributors can give his opinion if we should add technical prefixes / suffixes |
I find the suffix bad , but I think we mostly use it in Sonata, so to me, the real question is : are we ok with having both? Cause renaming all the existing interface in a BC way would be quite hard I think. |
I do like the suffix, and it's commonly used in Symfony. But it's a personal/team choice. All interface of SonataAdmin have the suffix. I would prefer to be consistent. |
That my be right, but we already support both naming schemas. E.g. this one introduced interfaces without the suffix: sonata-project/SonataFormatterBundle#417 |
Yes. Maybe we should decide now if we want to keep supporting both naming. The sooner we decide the less work we will have. @sonata-project/contributors |
I'd open an issue on dev-kit and link to previous similar discussions in it. |
79b5b9c
to
3d704fb
Compare
I added the |
Thanks @core23 |
Subject
There is no commen interface for breadcrumbs yet. A breadcrumb must implement a
handleContext
method.I am targeting this branch, because this feature is BC.
Changelog