private function createRootPage($site, $layout)
    {
        $pagebuilder = $this->bbapp->getContainer()->get('pagebuilder');
        $pagebuilder
            ->setUid(md5('root-' . $site->getLabel()))
            ->setTitle('Home')
            ->setLayout($layout)
            ->setSite($site)
            ->setUrl('/')
            ->putOnlineAndHidden()
        ;

        $page = $pagebuilder->getPage();
        $this->entyMgr->persist($page);
        $this->entyMgr->flush($page);

        return $page;
    }
private function createRootPage($site, $layout)
    {
        $pagebuilder = $this->bbapp->getContainer()->get('pagebuilder');
        $pagebuilder
            ->setUid(md5('root-' . $site->getLabel()))
            ->setTitle('Home')
            ->setLayout($layout)
            ->setSite($site)
            ->setUrl('/')
            ->putOnlineAndHidden()
        ;

        $page = $pagebuilder->getPage();
        $this->entyMgr->persist($page);
        $this->entyMgr->flush($page);

        return $page;
    }
private function createRootPage ( $ site , $ layout ) { $ pagebuilder = $ this -> bbapp -> getContainer ( ) -> get ( 'pagebuilder' ) ; $ pagebuilder -> setUid ( md5 ( 'root-' . $ site -> getLabel ( ) ) ) -> setTitle ( 'Home' ) -> setLayout ( $ layout ) -> setSite ( $ site ) -> setUrl ( '/' ) -> putOnlineAndHidden ( ) ; $ page = $ pagebuilder -> getPage ( ) ; $ this -> entyMgr -> persist ( $ page ) ; $ this -> entyMgr -> flush ( $ page ) ; return $ page ; }
Create new root page

@param  \BackBee\Site\Site       $site       Site object
@param  \BackBee\Site\Layout     $layout     Layout object

@return \BackBee\NestedNode\Page
Create new root page