Development

/plugins/sfDoctrineNestedSetEasyManagerPlugin/README

You must first sign up to be able to contribute.

root/plugins/sfDoctrineNestedSetEasyManagerPlugin/README

Revision 31113, 1.8 kB (checked in by binarty, 3 years ago)

* Firist beta released

Line 
1 # sfDoctrineNestedSetEasyManagerPlugin
2 **David Valin Cabrera - [Binarty](http://www.binarty.com "Binarty's website") - [Send an email to the author](mailto:info@binarty.com "Send email to the author")**
3
4 ## Whats this?
5
6 **This is a symfony plugin to manage NestedSet models with multiple roots**. It uses Doctrine ORM in backend and a pretty ajax&jquery UI in frontend to deal with the items of the tree.
7 You need to use it as **a component** (in fact it is), not as a widget, **you can embed it** near your lists asociated to the tree model: in product list, post list... or even in single templates or
8 **WHEREVER YOU WANT**.
9
10 ## Dependencies
11  
12   * sfDoctrinePlugin
13   * sfJqueryReloadedPlugin
14
15 ## How to use it
16
17   * First of all, **make sure you have loaded the plugin** in your config/ProjectConfiguration.class.php file.
18
19
20   * **Now enable the 'nestedSetManager' module** that comes with the plugin, in /apps/**yourapp**/config/settings.yml:
21  
22         enabled_modules:         [default, nestedSetManager]
23
24
25   * **Clear the cache**:
26
27         symfony cc
28
29
30   * **Publish the plugin assets**:
31
32         symfony plugin:publish-assets
33
34
35   * **Add the 'NestedSet' Doctrine behaviour** to one element of your model, example:
36
37         ProductCategory:
38           actAs:
39             NestedSet:
40               hasManyRoots: true
41               rootColumnName: root_id
42           columns:
43             name: string(255)
44
45
46   * Now you can **include the 'manager' component** in any template of your app, you need to pass 'the NestedSet model' and 'the item field' that you want to edit in the manager, example:
47
48         <?php echo include_component('nestedSetManager','manager', array('model' => 'ProductCategory', 'field' => 'name')) ?>
49
50 ## Next step ?
51
52   * Factorize and optimizations on code
53   * Be able to move an element outside its level
54   * Add sorting  feature using drag&drop
55   * UX optimizations
Note: See TracBrowser for help on using the browser.