protected function createNode($title, $parent = NULL)
 {
     $node = new NavigationNode(array('de' => $title));
     $node->setContext($this->context);
     if ($parent) {
         $node->setParent($parent);
     }
     return $node;
 }
Exemplo n.º 2
0
 protected function createNewFlatNode($title, $parent)
 {
     $titles = array($this->defaultLanguage => $title);
     $node = new NavigationNode($titles);
     $node->setParent($parent);
     $flatted = $this->controller->getFlatForUI(array($node), $this->defaultLanguage, $this->languages);
     return current($flatted);
 }
Exemplo n.º 3
0
 public function testContextLoadableReturnsNULLWhenIdenfieristBullshit()
 {
     $context = $this->getMockForAbstractClass('Psc\\TPL\\ContentStream\\Context');
     $context->expects($this->never())->method('getNavigationController');
     $this->assertNull(NavigationNode::loadWithContentStreamContext("0", $context));
 }
Exemplo n.º 4
0
 protected function insertPageWithNavigationNode()
 {
     $page = new Page('page-with-nav');
     $page->setActive(TRUE);
     $title = array();
     foreach ($this->languages as $lang) {
         $title[$lang] = 'node for page with navigation';
     }
     $nav = new NavigationNode($title);
     $nav->setLft(1);
     $nav->setRgt(1);
     $nav->setPage($page);
     $nav->setDepth(0);
     $this->em->persist($nav);
     $this->em->persist($page);
     $this->em->flush();
     $this->em->clear();
     return $this->hydrate('Page', $page->getIdentifier());
 }