File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
Bundle/EzPublishCoreBundle/Resources/config
Publish/Core/MVC/Symfony/View/Builder/Registry Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -220,8 +220,8 @@ services:
220220
221221 ezpublish.view_builder.registry :
222222 class : eZ\Publish\Core\MVC\Symfony\View\Builder\Registry\ControllerMatch
223- calls :
224- - [addToRegistry, [["@ezpublish .view_builder.content"]]]
223+ arguments :
224+ $viewBuilders : !tagged_iterator { tag: ibexa .view_builder }
225225
226226 ezpublish.view_builder.content :
227227 class : eZ\Publish\Core\MVC\Symfony\View\Builder\ContentViewBuilder
@@ -231,6 +231,8 @@ services:
231231 - " @ezpublish.view.view_parameters.injector.dispatcher"
232232 - " @request_stack"
233233 - " @ezpublish.content_info_location_loader.main"
234+ tags :
235+ - { name: ibexa.view_builder }
234236
235237 ezpublish.view.builder_parameter_collector.request_attributes :
236238 class : eZ\Publish\Core\MVC\Symfony\View\Builder\ParametersFilter\RequestAttributes
Original file line number Diff line number Diff line change @@ -17,6 +17,15 @@ class ControllerMatch implements ViewBuilderRegistry
1717 /** @var \eZ\Publish\Core\MVC\Symfony\View\Builder\ViewBuilder[] */
1818 private $ registry = [];
1919
20+ public function __construct (iterable $ viewBuilders = [])
21+ {
22+ $ toAdd = [];
23+ foreach ($ viewBuilders as $ viewBuilder ) {
24+ $ toAdd [] = $ viewBuilder ;
25+ }
26+ $ this ->addToRegistry ($ toAdd );
27+ }
28+
2029 /**
2130 * @param \eZ\Publish\Core\MVC\Symfony\View\Builder\ViewBuilder[] $viewBuilders
2231 */
You can’t perform that action at this time.
0 commit comments