| | 1 | = Symfony Doctrine Nested Set Manager Plugin = |
|---|
| | 2 | |
|---|
| | 3 | == Installation == |
|---|
| | 4 | You must enable the module for the nested set manager in your application settings.yml |
|---|
| | 5 | {{{ |
|---|
| | 6 | all: |
|---|
| | 7 | .settings: |
|---|
| | 8 | enabled_modules: [default, sfNestedSetManager] |
|---|
| | 9 | }}} |
|---|
| | 10 | |
|---|
| | 11 | == Usage == |
|---|
| | 12 | {{{ |
|---|
| | 13 | <?php |
|---|
| | 14 | // Category nested set with 1 root |
|---|
| | 15 | echo get_nested_set_manager('Category', 'name'); |
|---|
| | 16 | |
|---|
| | 17 | // Comments nested set with multiple roots |
|---|
| | 18 | // echo get_nested_set_manager('Comment', 'body', 1); // 3rd argument is the root id of the nested set tree |
|---|
| | 19 | ?> |
|---|
| | 20 | }}} |
|---|