1

I want to use Gedmo\Tree in Doctrine. I want to show all Trees, is it possible to sort root nodes?

For example: I have some categories. There are some main categories (root node) and subcategories (children). If I select and build tree (e.g. method childrenHierarchy), I will get sorted only children...

I was looking for some solution on the Interent and I got two possible solution: 1. fake root node 2. add sorting column to table

First solution isn't nice in my opinion. But how to do it according to the second solution? For example if I want to sort roots by name, how I'll do it?

0 Answers0