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

Commit d3c74f7

Browse files
committed
as the initializer is only run when sonata is present, ensure users create /cms/routes themselves
1 parent d6525e8 commit d3c74f7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

book/routing.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,7 @@ follows::
453453
use Doctrine\Common\Persistence\ObjectManager;
454454
use Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\Route;
455455
use Symfony\Cmf\Bundle\ContentBundle\Doctrine\Phpcr\StaticContent;
456+
use PHPCR\Util\NodeHelper;
456457

457458
class LoadRoutingData implements FixtureInterface
458459
{
@@ -466,6 +467,8 @@ follows::
466467
throw new \RuntimeException("Fixture requires a PHPCR ODM DocumentManager instance, instance of '$class' given.");
467468
}
468469

470+
NodeHelper::createPath($session, '/cms/routes');
471+
469472
$route = new Route();
470473
$route->setParentDocument($dm->find(null, '/cms/routes'));
471474
$route->setName('projects');

0 commit comments

Comments
 (0)