@@ -26,7 +26,7 @@ class CmfCoreExtension extends Extension implements PrependExtensionInterface
26
26
* Prepend persistence, multilang and other common configuration to all cmf
27
27
* bundles.
28
28
*
29
- * {@inheritDoc }
29
+ * {@inheritdoc }
30
30
*/
31
31
public function prepend (ContainerBuilder $ container )
32
32
{
@@ -60,8 +60,8 @@ public function prepend(ContainerBuilder $container)
60
60
'use_sonata_admin ' => $ persistenceConfig ['use_sonata_admin ' ],
61
61
'block_basepath ' => $ persistenceConfig ['basepath ' ].'/content ' ,
62
62
'manager_name ' => $ persistenceConfig ['manager_name ' ],
63
- )
64
- )
63
+ ),
64
+ ),
65
65
);
66
66
break ;
67
67
case 'cmf_content ' :
@@ -71,17 +71,17 @@ public function prepend(ContainerBuilder $container)
71
71
'enabled ' => $ persistenceConfig ['enabled ' ],
72
72
'use_sonata_admin ' => $ persistenceConfig ['use_sonata_admin ' ],
73
73
'content_basepath ' => $ persistenceConfig ['basepath ' ].'/content ' ,
74
- )
75
- )
74
+ ),
75
+ ),
76
76
);
77
77
break ;
78
78
case 'cmf_create ' :
79
79
$ prependConfig = array (
80
80
'persistence ' => array (
81
81
'phpcr ' => array (
82
82
'enabled ' => $ persistenceConfig ['enabled ' ],
83
- )
84
- )
83
+ ),
84
+ ),
85
85
);
86
86
// if cmf_media is there, it will prepend the image path to its media_basepath
87
87
// setting.
@@ -99,8 +99,8 @@ public function prepend(ContainerBuilder $container)
99
99
'enabled ' => $ persistenceConfig ['enabled ' ],
100
100
'media_basepath ' => $ persistenceConfig ['basepath ' ].'/media ' ,
101
101
'manager_name ' => $ persistenceConfig ['manager_name ' ],
102
- )
103
- )
102
+ ),
103
+ ),
104
104
);
105
105
break ;
106
106
case 'cmf_menu ' :
@@ -112,8 +112,8 @@ public function prepend(ContainerBuilder $container)
112
112
'content_basepath ' => $ persistenceConfig ['basepath ' ].'/content ' ,
113
113
'menu_basepath ' => $ persistenceConfig ['basepath ' ].'/menu ' ,
114
114
'manager_name ' => $ persistenceConfig ['manager_name ' ],
115
- )
116
- )
115
+ ),
116
+ ),
117
117
);
118
118
break ;
119
119
case 'cmf_routing ' :
@@ -128,9 +128,9 @@ public function prepend(ContainerBuilder $container)
128
128
'content_basepath ' => $ persistenceConfig ['basepath ' ].'/content ' ,
129
129
'route_basepaths ' => $ routePaths ,
130
130
'manager_name ' => $ persistenceConfig ['manager_name ' ],
131
- )
132
- )
133
- )
131
+ ),
132
+ ),
133
+ ),
134
134
);
135
135
136
136
if (isset ($ bundles ['CmfContentBundle ' ])) {
@@ -155,8 +155,8 @@ public function prepend(ContainerBuilder $container)
155
155
'search_basepath ' => $ persistenceConfig ['basepath ' ].'/content ' ,
156
156
'manager_name ' => $ persistenceConfig ['manager_name ' ],
157
157
'manager_registry ' => $ persistenceConfig ['manager_registry ' ],
158
- )
159
- )
158
+ ),
159
+ ),
160
160
);
161
161
if (!empty ($ persistenceConfig ['translation_strategy ' ])) {
162
162
$ prependConfig ['persistence ' ]['phpcr ' ]['translation_strategy ' ] = $ persistenceConfig ['translation_strategy ' ];
@@ -171,17 +171,17 @@ public function prepend(ContainerBuilder $container)
171
171
'basepath ' => $ persistenceConfig ['basepath ' ].'/simple ' ,
172
172
'manager_name ' => $ persistenceConfig ['manager_name ' ],
173
173
'manager_registry ' => $ persistenceConfig ['manager_registry ' ],
174
- )
175
- )
174
+ ),
175
+ ),
176
176
);
177
177
break ;
178
178
case 'cmf_tree_browser ' :
179
179
$ prependConfig = array (
180
180
'persistence ' => array (
181
181
'phpcr ' => array (
182
182
'enabled ' => $ persistenceConfig ['enabled ' ],
183
- )
184
- )
183
+ ),
184
+ ),
185
185
);
186
186
break ;
187
187
case 'cmf_seo ' :
@@ -220,9 +220,9 @@ public function prepend(ContainerBuilder $container)
220
220
'orm ' => array (
221
221
'enabled ' => $ persistenceConfig ['enabled ' ],
222
222
'manager_name ' => $ persistenceConfig ['manager_name ' ],
223
- )
224
- )
225
- )
223
+ ),
224
+ ),
225
+ ),
226
226
);
227
227
228
228
if (isset ($ bundles ['CmfContentBundle ' ])) {
@@ -252,7 +252,7 @@ public function prepend(ContainerBuilder $container)
252
252
}
253
253
254
254
/**
255
- * {@inheritDoc }
255
+ * {@inheritdoc }
256
256
*/
257
257
public function load (array $ configs , ContainerBuilder $ container )
258
258
{
@@ -262,13 +262,13 @@ public function load(array $configs, ContainerBuilder $container)
262
262
$ loader ->load ('services.xml ' );
263
263
264
264
if ($ config ['persistence ' ]['phpcr ' ]['enabled ' ]) {
265
- $ container ->setParameter ($ this ->getAlias () . '.persistence.phpcr.manager_name ' , $ config ['persistence ' ]['phpcr ' ]['manager_name ' ]);
266
- $ container ->setParameter ($ this ->getAlias () . '.persistence.phpcr.basepath ' , $ config ['persistence ' ]['phpcr ' ]['basepath ' ]);
265
+ $ container ->setParameter ($ this ->getAlias (). '.persistence.phpcr.manager_name ' , $ config ['persistence ' ]['phpcr ' ]['manager_name ' ]);
266
+ $ container ->setParameter ($ this ->getAlias (). '.persistence.phpcr.basepath ' , $ config ['persistence ' ]['phpcr ' ]['basepath ' ]);
267
267
268
- $ templatingHelper = $ container ->getDefinition ($ this ->getAlias () . '.templating.helper ' );
268
+ $ templatingHelper = $ container ->getDefinition ($ this ->getAlias (). '.templating.helper ' );
269
269
$ templatingHelper ->addMethodCall ('setDoctrineRegistry ' , array (
270
270
new Reference ($ config ['persistence ' ]['phpcr ' ]['manager_registry ' ]),
271
- '%cmf_core.persistence.phpcr.manager_name% '
271
+ '%cmf_core.persistence.phpcr.manager_name% ' ,
272
272
));
273
273
274
274
if ($ config ['persistence ' ]['phpcr ' ]['use_sonata_admin ' ]) {
@@ -282,10 +282,10 @@ public function load(array $configs, ContainerBuilder $container)
282
282
}
283
283
284
284
if (isset ($ config ['multilang ' ])) {
285
- $ container ->setParameter ($ this ->getAlias () . '.multilang.locales ' , $ config ['multilang ' ]['locales ' ]);
285
+ $ container ->setParameter ($ this ->getAlias (). '.multilang.locales ' , $ config ['multilang ' ]['locales ' ]);
286
286
$ loader ->load ('translatable.xml ' );
287
287
if (!empty ($ config ['persistence ' ]['phpcr ' ]['translation_strategy ' ])) {
288
- $ container ->setParameter ($ this ->getAlias () . '.persistence.phpcr.translation_strategy ' , $ config ['persistence ' ]['phpcr ' ]['translation_strategy ' ]);
288
+ $ container ->setParameter ($ this ->getAlias (). '.persistence.phpcr.translation_strategy ' , $ config ['persistence ' ]['phpcr ' ]['translation_strategy ' ]);
289
289
} else {
290
290
$ container ->removeDefinition ('cmf_core.persistence.phpcr.translatable_metadata_listener ' );
291
291
}
@@ -295,7 +295,7 @@ public function load(array $configs, ContainerBuilder $container)
295
295
296
296
foreach ($ config ['sonata_admin ' ]['extensions ' ] as $ extensionName => $ options ) {
297
297
foreach ($ options as $ key => $ value ) {
298
- $ container ->setParameter ('cmf_core.sonata_admin.extension. ' . $ extensionName . '. ' . $ key , $ value );
298
+ $ container ->setParameter ('cmf_core.sonata_admin.extension. ' . $ extensionName. '. ' . $ key , $ value );
299
299
}
300
300
}
301
301
@@ -314,7 +314,7 @@ public function loadSonataPhpcrAdmin($config, XmlFileLoader $loader, ContainerBu
314
314
}
315
315
316
316
/**
317
- * Setup the cmf_core_checkbox_url_label form type if the routing bundle is there
317
+ * Setup the cmf_core_checkbox_url_label form type if the routing bundle is there.
318
318
*
319
319
* @param ContainerBuilder $container
320
320
* @param LoaderInterface $loader
@@ -348,29 +348,29 @@ private function loadPublishWorkflow($config, XmlFileLoader $loader, ContainerBu
348
348
$ loader ->load ('publish-workflow.xml ' );
349
349
350
350
if (!$ config ['request_listener ' ]) {
351
- $ container ->removeDefinition ($ this ->getAlias () . '.publish_workflow.request_listener ' );
351
+ $ container ->removeDefinition ($ this ->getAlias (). '.publish_workflow.request_listener ' );
352
352
} elseif (!class_exists ('Symfony\Cmf\Bundle\RoutingBundle\Routing\DynamicRouter ' )) {
353
353
throw new InvalidConfigurationException ('The "publish_workflow.request_listener" may not be enabled unless "Symfony\Cmf\Bundle\RoutingBundle\Routing\DynamicRouter" is available. ' );
354
354
}
355
355
356
356
if (!class_exists ('Sonata\AdminBundle\Admin\AdminExtension ' )) {
357
- $ container ->removeDefinition ($ this ->getAlias () . '.admin_extension.publish_workflow.publishable ' );
358
- $ container ->removeDefinition ($ this ->getAlias () . '.admin_extension.publish_workflow.time_period ' );
357
+ $ container ->removeDefinition ($ this ->getAlias (). '.admin_extension.publish_workflow.publishable ' );
358
+ $ container ->removeDefinition ($ this ->getAlias (). '.admin_extension.publish_workflow.time_period ' );
359
359
}
360
360
361
361
$ container ->setAlias ('cmf_core.publish_workflow.checker ' , $ config ['checker_service ' ]);
362
362
}
363
363
364
364
/**
365
- * {@inheritDoc }
365
+ * {@inheritdoc }
366
366
*/
367
367
public function getXsdValidationBasePath ()
368
368
{
369
369
return __DIR__ .'/../Resources/config/schema ' ;
370
370
}
371
371
372
372
/**
373
- * {@inheritDoc }
373
+ * {@inheritdoc }
374
374
*/
375
375
public function getNamespace ()
376
376
{
0 commit comments