Modified Preorder Tree Traversal library for Kohana ORM.
Switch branches/tags
Nothing to show
Latest commit ee1d3dc Nov 1, 2011 @evopix Updating readme
Failed to load latest commit information.
tests/orm_mptt Updating readme Nov 1, 2011

This is the stable branch for Kohana 3.1 and is no longer maintained!!!

MPTT Library, extends ORM


Place module in /modules/ and include the call in your bootstrap.

Declaring your ORM object

class Model_Category extends ORM_MPTT {

Usage Examples

Creating a root node:

$cat = ORM::factory('Category_Mptt');
$cat->name = 'Music';
echo 'Category ID'.$mptt->id.' set at level '.$cat->lvl.' (scope: '.$cat->scope.')';
$c1 = $cat; // Saving id for next example

Creating a child node:

$cat->clear(); // Clearing ORM object
$cat->name = 'Terminology';