2017 © Pedro Peláez
 

library orm-mptt

image

boomcms/orm-mptt

  • Monday, November 3, 2014
  • by robbytaylor
  • Repository
  • 3 Watchers
  • 0 Stars
  • 513 Installations
  • 1 Dependents
  • 0 Suggesters
  • 21 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

MPTT Library, extends ORM

Setup

Place module in /modules/ and include the call in your bootstrap., (*1)

Declaring your ORM object

class Model_Category extends ORM_MPTT {
}

Usage Examples

Creating a root node:

$cat = ORM::factory('Category_Mptt');
$cat->name = 'Music';
$cat->insert_as_new_root();
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';
$cat->insert_as_last_child($c1);

The Versions

03/11 2014

dev-master

9999999-dev

  Sources   Download

The Requires

 

by Rob Taylor

03/11 2014

v3.3.0

3.3.0.0

  Sources   Download

The Requires

 

by Rob Taylor