ioDoctrineMenuPlugin

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
Plugin Information Installation Contribute
ioDoctrineMenuPlugin
Plugin image
3
users
Sign-in
to change
your status

ioDoctrineMenuPlugin

This plugin is still in development, check back tomorrow :)

This plugin is developed at github http://github.com/weaverryan/ioDoctrineMenuPlugin

Adds a Doctrine menu model with admin area. The menu model, ioDoctrineMenuItem, is used as a datasource for ioMenuItem objects from the ioMenuPlugin.

Easily retrieve menu trees that are stored in the database:

$menu = Doctrine_Core::getTable('ioDoctrineMenuItem')->retrieveMenu('root-slug');

Or create menu items and persist them to the database.

$menu = new ioMenuItem('root', '@homepage');
$menu->addChild('Sympal', 'http://www.sympalphp.org');
$menu->addChild('Account', '@account')
  ->requiresAuth(true)
  ->setCredentials('ManageAccount');

// persist the menu to the database
Doctrine_Core::getTable('ioDoctrineMenuItem')->persistMenu($menu);