2017 © Pedro Peláez
 

kohana-module kohana-orm-mptt

Kohana 3.3 module - Modified Preorder Tree Traversal library for Kohana ORM

image

seyfer/kohana-orm-mptt

Kohana 3.3 module - Modified Preorder Tree Traversal library for Kohana ORM

  • Tuesday, December 30, 2014
  • by seyfer
  • Repository
  • 3 Watchers
  • 3 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 21 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

This forks aims to make MPTT work with Kohana 3.3

So far we've only fixed filename for PSR-0, so usage is the same than before, (*1)

MPTT Library, extends ORM

Setup

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

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

30/12 2014

dev-3.3/master

dev-3.3/master

Kohana 3.3 module - Modified Preorder Tree Traversal library for Kohana ORM

  Sources   Download

The Requires

 

by Avatar evopix
by flody

30/12 2014

dev-master

9999999-dev

Kohana 3.3 module - Modified Preorder Tree Traversal library for Kohana ORM

  Sources   Download

The Requires

 

by Avatar evopix
by flody