public function init(ManagerRegistry $registry) { $dm = $registry->getManager(); if ($dm->find(null, $this->basePath)) { return; } $site = new Site(); $site->setId($this->basePath); $dm->persist($site); $dm->flush(); $session = $registry->getConnection(); // create the 'cms', 'pages', and 'posts' nodes NodeHelper::createPath($session, $this->basePath . '/pages'); NodeHelper::createPath($session, $this->basePath . '/posts'); NodeHelper::createPath($session, $this->basePath . '/routes'); $session->save(); }
/** * {@inheritDoc} */ public function getChildren() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getChildren', array()); return parent::getChildren(); }