-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[Template][Events] Introduce Context Providers for Template Blocks #14328
[Template][Events] Introduce Context Providers for Template Blocks #14328
Conversation
0a4334e
to
535d83c
Compare
src/Sylius/Bundle/UiBundle/Renderer/TwigTemplateBlockRenderer.php
Outdated
Show resolved
Hide resolved
535d83c
to
35eaf40
Compare
35eaf40
to
ec2b0c9
Compare
/** | ||
* @experimental | ||
*/ |
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.
/** | |
* @experimental | |
*/ | |
/** @experimental */ |
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 forgot to refactor it but in the next PR, I will completely remove @experimental
tags so I would be for leaving it as it is for now.
src/Sylius/Bundle/UiBundle/ContextProvider/LegacySonataEventContextProvider.php
Outdated
Show resolved
Hide resolved
ec2b0c9
to
ff89aa2
Compare
Thank you, Kevin! 🎉 |
…tion guide (coldic3) This PR was merged into the 1.12 branch. Discussion ---------- | Q | A | |-----------------|--------------------------------------------------------------| | Branch? | 1.12 | | Bug fix? | no | | New feature? | no | | BC breaks? | no | | Deprecations? | no | | Related tickets | #14328 | | License | MIT | ![image](https://user-images.githubusercontent.com/13316080/192718740-b269ca2d-4d9d-467c-a278-f2084155d78a.png) ![image](https://user-images.githubusercontent.com/13316080/192718830-7a6e5b53-014e-4f68-89b5-9b9f6b744bba.png) ![image](https://user-images.githubusercontent.com/13316080/192718870-b05afac1-e72e-43f2-8871-a3271691cf50.png) Commits ------- 0ff9022 [Docs] Add Context Providers to the template customization guide
Since
Sylius\Bundle\UiBundle\Block\BlockEventListener
is deprecated, there is no easy way to add additional data to the template context before rendering. This PR introducesContextProviderInterface
that allows you to implement your own Context Provider for template blocks.