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

Commit 8864c15

Browse files
committed
Merge pull request #360 from dream89/patch-1
Fix: Can't load PHPCR DataFixtures
2 parents b87f54c + 446b5ec commit 8864c15

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cookbook/create_basic_cms_auto_routing.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,8 @@ service container configuration:
296296
services:
297297
acme.basic_cms.phpcr.initializer:
298298
class: Doctrine\Bundle\PHPCRBundle\Initializer\GenericInitializer
299-
arguments: [ "/cms/pages", "/cms/posts", "/cms/routes" ]
299+
arguments:
300+
- [ "/cms/pages", "/cms/posts", "/cms/routes" ]
300301
tags:
301302
- { name: doctrine_phpcr.initializer }
302303
@@ -377,6 +378,7 @@ Create a page for your CMS::
377378
{
378379
public function load(ObjectManager $dm)
379380
{
381+
NodeHelper::createPath($dm->getPhpcrSession(), '/cms/pages');
380382
$parent = $dm->find(null, '/cms/pages');
381383

382384
$page = new Page();
@@ -406,6 +408,7 @@ and add some posts::
406408
{
407409
public function load(ObjectManager $dm)
408410
{
411+
NodeHelper::createPath($dm->getPhpcrSession(), '/cms/posts');
409412
$parent = $dm->find(null, '/cms/posts');
410413

411414
foreach (array('First', 'Second', 'Third', 'Forth') as $title) {
@@ -688,8 +691,9 @@ Now you will need to include this configuration:
688691

689692
.. code-block:: yaml
690693
691-
# src/Acme/BasicCmsBundle/Resources/config/config.yml
694+
# app/config/config.yml
692695
imports:
696+
// ...
693697
- { resource: routing_auto.yml }
694698
695699
.. code-block:: xml

0 commit comments

Comments
 (0)