You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now it allow to enable or disable a template from a configuration file.
But it only allow to define ahead of time if yes or no it should be enabled.
sylius.admin.create:
template: "@Bundle/example.html.twig"enabled: true # or false
It would be nice to be able to express logic based on external factor, ex: given a certain parameter in the URL.
I think we could use the ExpressionLanguage Component, like it's use in other part of the Sylius configuration files
Describe alternatives you've considered
I tried to implements the TemplateBlockRegistryInterface, but the compilerPass in Sylius/Bundle/UiBundle/DependencyInjection/SyliusUiExtension.php always refer to the TemplateBlockRegistry
I tried to decorate the TemplateBlockRegistry, but it's not public when compiled.
Describe the proposed solution
In the
Sylius/Bundle/UiBundle/Registry/TemplateBlockRegistry.php
there are theses lines :Right now it allow to enable or disable a template from a configuration file.
But it only allow to define ahead of time if yes or no it should be enabled.
It would be nice to be able to express logic based on external factor, ex: given a certain parameter in the URL.
I think we could use the ExpressionLanguage Component, like it's use in other part of the Sylius configuration files
Describe alternatives you've considered
I tried to implements the TemplateBlockRegistryInterface, but the compilerPass in
Sylius/Bundle/UiBundle/DependencyInjection/SyliusUiExtension.php
always refer to the TemplateBlockRegistryI tried to decorate the TemplateBlockRegistry, but it's not public when compiled.
Additional context
The text was updated successfully, but these errors were encountered: