Z tworzeniem drzewa nie ma problemu ale z odczytaniem troszke tak poniewaz drzewo jest domyslnie odczytywane w odwrotnej kolejnosci. Zeby dostac poprawne drzewo trzeba uzyc klasy RecursiveIteratorIterator
tutaj jest link do manuala z propela http://propel.phpdb.org/trac/wiki/Users/Do.../Tree/NestedSet
mam taki problem odczytuje drzewo i probuje wyswietlic :
<?php $root = CategoryPeer::retrieveTree(1); $this->it = new RecursiveIteratorIterator($root, RecursiveIteratorIterator::SELF_FIRST); ?>
dostaje error - chyba nie do konca kumam jak nalezy uzywac tej klasy RecursiveIteratorIterator
Catchable fatal error: Argument 1 passed to RecursiveIteratorIterator::__construct() must implement interface Traversable, boolean given, called in C:\Program Files\WebServ\httpd\sf_sandbox\lib\symfony\action\sfActions. class.php on line 53 and defined in C:\Program Files\WebServ\httpd\sf_sandbox\apps\frontend\modules\tree\ac tions\actions.class.php on line 44