public function load(ObjectManager $manager) { $session = $manager->getPhpcrSession(); $basePath = $this->container->getParameter('cmf_simple_cms.persistence.phpcr.basepath'); NodeHelper::createPath($session, preg_replace('#/[^/]*$#', '', $basePath)); $root = $manager->find(null, $basePath); if (!$root) { $root = new Page(); $root->setId($basePath); $root->setTitle('Home Page'); } $manager->persist($root); $manager->flush(); }