creocoder / yii2-nested-sets

The nested sets behavior for the Yii framework.
Other
446 stars 129 forks source link

Added method rebuildTree, to initialize a tree #101

Closed ebuzzz closed 7 years ago

ebuzzz commented 8 years ago

I've created a method to initialize a tree that already has a parent/child relation available. For example, when upgrading an old database format to include the advantages of a nested set.

The method uses the parentAttribute value to search for children. It then updates the tree recursively.

creocoder commented 7 years ago

This behavior does not plan to contains any converter methods.