Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 781534e

Browse files
committed
Fixed Repository Initializer example
1 parent 5da460c commit 781534e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

bundles/phpcr_odm.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -662,9 +662,10 @@ is used to let bundles register PHPCR node types and to create required base
662662
paths in the repository. Initializers have to implement
663663
``Doctrine\Bundle\PHPCRBundle\Initializer``. If you don't need any special
664664
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.
668669

669670
A service to use the generic initializer looks like this:
670671

@@ -676,6 +677,7 @@ A service to use the generic initializer looks like this:
676677
acme.phpcr.initializer:
677678
class: Doctrine\Bundle\PHPCRBundle\Initializer\GenericInitializer
678679
arguments:
680+
- AcmeContentBundle Basepaths
679681
- { "%acme.content_basepath%", "%acme.menu_basepath%" }
680682
- { "%acme.cnd%" }
681683
tags:
@@ -685,6 +687,7 @@ A service to use the generic initializer looks like this:
685687
686688
<!-- src/Acme/ContentBundle/Resources/config/services.xml -->
687689
<service id="acme.phpcr.initializer" class="Doctrine\Bundle\PHPCRBundle\Initializer\GenericInitializer">
690+
<argument>AcmeContentBundle Basepaths</argument>
688691
<argument type="collection">
689692
<argument>%acme.content_basepath%</argument>
690693
<argument>%acme.menu_basepath%</argument>
@@ -702,8 +705,9 @@ A service to use the generic initializer looks like this:
702705
$definition = new Definition(
703706
'Doctrine\Bundle\PHPCRBundle\Initializer\GenericInitializer',
704707
array(
708+
'AcmeContentBundle Basepaths',
705709
array('%acme.content_basepath%', '%acme.menu_basepath%'),
706-
$cnd
710+
'%acme.cnd%',
707711
)
708712
));
709713
$definition->addTag('doctrine_phpcr.initializer');

0 commit comments

Comments
 (0)