cakephp/cakephp — pull request #3164 by lorenzo (2014-03-29 21:05:20+00:00)
Title: 3.0 tree behavior

This implements most of the tree behavior. Some differences compared to 2.x:

* getPath and getChildren are now custom finders `find('path')` and `find('children')`
* Tree scope can be a callable function that can be used to alter the finding queries in any way
* Removed the obscure future of having a tree with no parent column
* Uses slightly less queries than its previous incarnation

A huge thanks to @quickapps who championed big parts of the new implementation.

In future PRs the following will be implemented, help will be greatly appreciated:

* Removing node from tree
* `moveTo`
* `beforeDelete` logic
* A finder method that will attach afterFind logic for formatting the tree, as a replacement for generateTreeList
* A trait containing the methods `childCount`, `isRootNode`, `isLeafNode`