lundi 2 novembre 2015

getNestedList() method seems return wrong order in etrepat/baum

According to etrepat/baum Docs, getNestedList() must return a key-value pair array indicating a node's depth with a separator.

This is my Table data and Structure :
enter image description here

By this Code :

$categories = Category::getNestedList('name',NULL,'-');
return $categories; 

Result is :

enter image description here

While it should look like this

enter image description here

means that ever child Category must came immediately after it's Parent and order by lft column field But getNestedList() Does not this wotk and return Categories In the same way that are inserted to Table.

How can I do my purpose ?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire