Skip to content

Commit e703179

Browse files
committed
Adding a quick and dirty, but accurate README file. This plugin is working really well (with tests), but is not quite finished yet.
1 parent fb1fa83 commit e703179

File tree

1 file changed

+46
-7
lines changed

1 file changed

+46
-7
lines changed

README.markdown

+46-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
ioDoctrineMenuPlugin
22
====================
33

4-
### This plugin is still in development, check back tomorrow :)
4+
### This plugins is fully-functional and tested, but is still missing some features.
55

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).
89

9-
Easily retrieve menu trees that are stored in the database:
10+
Quick documentation
11+
-------------------
1012

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.
1215

13-
Or create menu items and persist them to the database.
16+
First, create a menu item and persist it to the database.
1417

1518
$menu = new ioMenuItem('root', '@homepage');
1619
$menu->addChild('Sympal', 'http://www.sympalphp.org');
@@ -19,4 +22,40 @@ Or create menu items and persist them to the database.
1922
->setCredentials('ManageAccount');
2023

2124
// 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

Comments
 (0)