Ejemplo n.º 1
0
 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 setId($id)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'setId', array($id));
     return parent::setId($id);
 }