Skip to content

Commit f654c22

Browse files
committed
Merge pull request #94 from symfony-cmf/di-media-create-prepend
only prepend an image path to CreateBundle if MediaBundle is not present
2 parents 95fd507 + 7019790 commit f654c22

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

DependencyInjection/CmfCoreExtension.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,16 @@ public function prepend(ContainerBuilder $container)
7373
'persistence' => array(
7474
'phpcr' => array(
7575
'enabled' => $persistenceConfig['enabled'],
76-
'image' => array(
77-
'basepath' => $persistenceConfig['basepath'].'/media',
78-
)
7976
)
8077
)
8178
);
79+
// if cmf_media is there, it will prepend the image path to its media_basepath
80+
// setting.
81+
if (!isset($extensions['cmf_media'])) {
82+
$prependConfig['persistence']['phpcr']['image'] = array(
83+
'basepath' => $persistenceConfig['basepath'].'/media',
84+
);
85+
}
8286
break;
8387
case 'cmf_media':
8488
$prependConfig = array(

0 commit comments

Comments
 (0)