1
1
ioDoctrineMenuPlugin
2
2
====================
3
3
4
- ### This plugin is still in development, check back tomorrow :)
4
+ ### This plugins is fully-functional and tested, but is still missing some features.
5
5
6
- Adds a Doctrine menu model with admin area. The menu model, ioDoctrineMenuItem,
7
- is used as a datasource for ioMenuItem objects from the ioMenuPlugin.
6
+ I'll be releasing a first, finished release before June 10th. The majority
7
+ of the documentation can be found on the ` ioMenuItemPlugin `
8
+ [ http://github.com/weaverryan/ioMenuPlugin/tree/master/docs/ ] ( here ) .
8
9
9
- Easily retrieve menu trees that are stored in the database:
10
+ Quick documentation
11
+ -------------------
10
12
11
- $menu = Doctrine_Core::getTable('ioDoctrineMenuItem')->retrieveMenu('root-slug');
13
+ Adds a data persistence layer to ` ioMenuPlugin ` . Create simple object-oriented
14
+ menus and then easily persist them to and retrieve them from the database.
12
15
13
- Or create menu items and persist them to the database.
16
+ First, create a menu item and persist it to the database.
14
17
15
18
$menu = new ioMenuItem('root', '@homepage');
16
19
$menu->addChild('Sympal', 'http://www.sympalphp.org');
@@ -19,4 +22,40 @@ Or create menu items and persist them to the database.
19
22
->setCredentials('ManageAccount');
20
23
21
24
// persist the menu to the database
22
- Doctrine_Core::getTable('ioDoctrineMenuItem')->persistMenu($menu);
25
+ Doctrine_Core::getTable('ioDoctrineMenuItem')->persist($menu);
26
+
27
+ Next, aasily retrieve the menu item from the database:
28
+
29
+ $menu = Doctrine_Core::getTable('ioDoctrineMenuItem')
30
+ ->fetchMenu('root');
31
+
32
+ Additionally, caching of the doctrine menu items is automatically handled
33
+ if you retrieve the menu items from the menu manager. For example, from
34
+ the actions:
35
+
36
+ public function executeIndex(sfWebRequest $request)
37
+ {
38
+ $this->menu = $this->getContext()
39
+ ->getConfiguration()
40
+ ->getPluginConfiguration('ioDoctrineMenuPlugin')
41
+ ->getMenuManager()
42
+ ->getMenu('admin');
43
+ }
44
+
45
+ Finally, the plugin comes packaged with an admin module that allows for
46
+ reordering and sorting of the menus via jQuery's Nested Sortable widget.
47
+
48
+ Care to Contribute?
49
+ -------------------
50
+
51
+ Please clone and improve this plugin! This plugin is by the community and
52
+ for the community and I hope it can be final solution for handling menus.
53
+
54
+ If you have any ideas, notice any bugs, or have any ideas, you can reach
55
+ me at ryan [ at] thatsquality.com.
56
+
57
+ A bug tracker is available at
58
+ [ http://redmine.sympalphp.org/projects/io-doctrine-menu ] ( http://redmine.sympalphp.org/projects/io-doctrine-menu )
59
+
60
+ This plugin was taken from [ sympal CMF] ( http://www.sympalphp.org ) and was
61
+ developed by both Ryan Weaver and Jon Wage.
0 commit comments