sfDoctrineNestedSetManagerPlugin - 1.2.1

Symfony Doctrine Nested Set Manager Plugin

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to the Plugins Home

Signin


Forgot your password?
Create an account

Tools

Stats

advanced search
Information Readme Dependencies Releases Changelog Contribute
Show source

Symfony Doctrine Nested Set Manager Plugin

Installation

You must enable the module for the nested set manager in your application settings.yml

all:
  .settings:
  enabled_modules:        [default, sfNestedSetManager]

Usage

<?php
    // Need to use the helper
    use_helper('NestedSetManager');
 
    // Category nested set with 1 root
    echo get_nested_set_manager('Category', 'name');
 
    // Comments nested set with multiple roots
    // echo get_nested_set_manager('Comment', 'body', 1); // 3rd argument is the root id of the nested set tree
    ?>