@@ -662,9 +662,10 @@ is used to let bundles register PHPCR node types and to create required base
662
662
paths in the repository. Initializers have to implement
663
663
``Doctrine\Bundle\PHPCRBundle\Initializer ``. If you don't need any special
664
664
logic, you can simply configure the ``GenericInitializer `` as service and don't
665
- need to write any code. The generic initializer expects an array of base paths
666
- it will create if they do not exist, and an optional string defining namespaces
667
- and primary / mixin node types in the CND language.
665
+ need to write any code. The generic initializer expects a name to identify
666
+ the initializer, an array of base paths it will create if they do not exist
667
+ and an optional string defining namespaces and primary / mixin node types in
668
+ the CND language.
668
669
669
670
A service to use the generic initializer looks like this:
670
671
@@ -676,6 +677,7 @@ A service to use the generic initializer looks like this:
676
677
acme.phpcr.initializer :
677
678
class : Doctrine\Bundle\PHPCRBundle\Initializer\GenericInitializer
678
679
arguments :
680
+ - AcmeContentBundle Basepaths
679
681
- { "%acme.content_basepath%", "%acme.menu_basepath%" }
680
682
- { "%acme.cnd%" }
681
683
tags :
@@ -685,6 +687,7 @@ A service to use the generic initializer looks like this:
685
687
686
688
<!-- src/Acme/ContentBundle/Resources/config/services.xml -->
687
689
<service id =" acme.phpcr.initializer" class =" Doctrine\Bundle\PHPCRBundle\Initializer\GenericInitializer" >
690
+ <argument >AcmeContentBundle Basepaths</argument >
688
691
<argument type =" collection" >
689
692
<argument >%acme.content_basepath%</argument >
690
693
<argument >%acme.menu_basepath%</argument >
@@ -702,8 +705,9 @@ A service to use the generic initializer looks like this:
702
705
$definition = new Definition(
703
706
'Doctrine\Bundle\PHPCRBundle\Initializer\GenericInitializer',
704
707
array(
708
+ 'AcmeContentBundle Basepaths',
705
709
array('%acme.content_basepath%', '%acme.menu_basepath%'),
706
- $ cnd
710
+ '%acme. cnd%',
707
711
)
708
712
));
709
713
$definition->addTag('doctrine_phpcr.initializer');
0 commit comments