Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [Symfony] nestedSet - problem, Sf 1.4
janek9
post
Post #1





Grupa: Zarejestrowani
Postów: 121
Pomógł: 2
Dołączył: 22.03.2009

Ostrzeżenie: (0%)
-----


Witam, probuje uruchomic nestedtree zgodnie z dokumentacja dla propel 1.3. Utworzylem tabele tak jak jest tam opisane, natomiast przy probie zapisu do tej tabeli nie widzi funkcji: makeRoot(). Co jest grane..? Pomoże mi ktos..

  1.  
  2. root = new Menu();
  3. $root->setText('Google');
  4. $root->setLink('http://www.google.com');
  5.  
  6. $root->makeRoot();
  7. $root->setScopeIdValue(1); // Tree 1
  8. $root->save();
  9.  
  10. $menu = new Menu();
  11. $menu->setText('Google Mail');
  12. $menu->setLink('http://mail.google.com');
  13. $menu->insertAsLastChildOf($root);
  14. $menu->save();
  15.  
  16. // Create secund root node
  17. $root2 = new Menu();
  18. $root2->setText('Yahoo!');
  19. $root2->setLink('http://www.yahoo.com');
  20.  
  21. $root2->makeRoot();
  22. $root2->setScopeIdValue(2); // Tree 2
  23. $root2->save();
  24.  
  25. $menu = new Menu();
  26. $menu->setText('Yahoo! Mail');
  27. $menu->setLink('http://mail.yahoo.com');
  28. $menu->insertAsLastChildOf($root2);
  29. $menu->save();
  30.  



link do dokumentacji: nestedset propel1.3
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 05:02