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

Commit d579037

Browse files
committed
Merge pull request #650 from Zepcome/debug_quick_tour_router_chapter
Debug quick-tour router chapter
2 parents 1564dd8 + 5e6fe66 commit d579037

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

quick_tour/the_router.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ Now you can add a new ``Route`` to the tree using Doctrine::
151151

152152
use Doctrine\Common\Persistence\ObjectManager;
153153
use Doctrine\Common\DataFixtures\FixtureInterface;
154+
155+
use PHPCR\Util\NodeHelper;
154156

155157
use Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\Route;
156158

@@ -162,6 +164,9 @@ Now you can add a new ``Route`` to the tree using Doctrine::
162164
$class = get_class($documentManager);
163165
throw new \RuntimeException("Fixture requires a PHPCR ODM DocumentManager instance, instance of '$class' given.");
164166
}
167+
168+
$session = $documentManager->getPhpcrSession();
169+
NodeHelper::createPath($session, '/cms/routes');
165170

166171
$routesRoot = $documentManager->find(null, '/cms/routes');
167172

0 commit comments

Comments
 (0)