@@ -48,7 +48,7 @@ public function setupFormTypes(array $config, ContainerBuilder $container, Loade
48
48
$ loader ->load ('form-type.xml ' );
49
49
50
50
if (isset ($ config ['dynamic ' ])) {
51
- $ routeTypeTypeDefinition = $ container ->getDefinition (' cmf_routing .route_type_form_type ' );
51
+ $ routeTypeTypeDefinition = $ container ->getDefinition ($ this -> getAlias () . ' .route_type_form_type ' );
52
52
53
53
foreach (array_keys ($ config ['dynamic ' ]['controllers_by_type ' ]) as $ routeType ) {
54
54
$ routeTypeTypeDefinition ->addMethodCall ('addRouteType ' , array ($ routeType ));
@@ -93,14 +93,14 @@ private function setupDynamicRouter(array $config, ContainerBuilder $container,
93
93
}
94
94
95
95
if (isset ($ config ['route_provider_service_id ' ])) {
96
- $ container ->setAlias (' cmf_routing .route_provider ' , $ config ['route_provider_service_id ' ]);
96
+ $ container ->setAlias ($ this -> getAlias () . ' .route_provider ' , $ config ['route_provider_service_id ' ]);
97
97
$ hasProvider = true ;
98
98
}
99
99
if (!$ hasProvider ) {
100
100
throw new InvalidConfigurationException ('When the dynamic router is enabled, you need to either enable one of the persistence layers or set the cmf_routing.dynamic.route_provider_service_id option ' );
101
101
}
102
102
if (isset ($ config ['content_repository_service_id ' ])) {
103
- $ container ->setAlias (' cmf_routing .content_repository ' , $ config ['content_repository_service_id ' ]);
103
+ $ container ->setAlias ($ this -> getAlias () . ' .content_repository ' , $ config ['content_repository_service_id ' ]);
104
104
$ hasContentRepository = true ;
105
105
}
106
106
// content repository is optional
@@ -111,7 +111,7 @@ private function setupDynamicRouter(array $config, ContainerBuilder $container,
111
111
));
112
112
}
113
113
114
- $ dynamic = $ container ->getDefinition ($ this ->getAlias (). '.dynamic_router ' );
114
+ $ dynamic = $ container ->getDefinition ($ this ->getAlias () . '.dynamic_router ' );
115
115
116
116
// if any mappings are defined, set the respective route enhancer
117
117
if (!empty ($ config ['generic_controller ' ])) {
@@ -147,7 +147,7 @@ private function setupDynamicRouter(array $config, ContainerBuilder $container,
147
147
}
148
148
149
149
if (!empty ($ config ['route_filters_by_id ' ])) {
150
- $ matcher = $ container ->getDefinition (' cmf_routing .nested_matcher ' );
150
+ $ matcher = $ container ->getDefinition ($ this -> getAlias () . ' .nested_matcher ' );
151
151
foreach ($ config ['route_filters_by_id ' ] as $ id => $ priority ) {
152
152
$ matcher ->addMethodCall ('addRouteFilter ' , array (new Reference ($ id ), $ priority ));
153
153
}
@@ -169,7 +169,7 @@ public function loadPhpcrProvider($config, XmlFileLoader $loader, ContainerBuild
169
169
$ container ->setAlias ($ this ->getAlias () . '.content_repository ' , $ this ->getAlias () . '.phpcr_content_repository ' );
170
170
171
171
if (!$ locales ) {
172
- $ container ->removeDefinition (' cmf_routing .phpcrodm_route_locale_listener ' );
172
+ $ container ->removeDefinition ($ this -> getAlias () . ' .phpcrodm_route_locale_listener ' );
173
173
}
174
174
175
175
if ($ config ['use_sonata_admin ' ]) {
0 commit comments