Actually its not currently used, the PR is changing quite a bit as I
work on it. It was used by the MenuItem::addChild method.

In the KnpMenu you can do ``$item->addChild('foobar', array('label' =>
'foo', 'uri' => '/asdfsadf/'))``. This method then uses the
``MenuFactory`` class to create the new node.

The thing that worried me was having to hydrate the Content object. I
am currently working on the assumption that we will deserialize the
content from a UUID/Path, and in this case we would need to inject a
DocumentManager, and that dependence makes the whole thing less
convenient.

Also, I have been looking at the Symfony Serializer component which
overlaps quite a bit with this class.

On Tue, Jan 01, 2013 at 01:21:43PM -0800, Uwe Jäger wrote:
> > @@ -0,0 +1,91 @@
> > +<?php
> > +
> > +namespace Symfony\Cmf\Bundle\MenuBundle\Factory;
> > +use Symfony\Cmf\Bundle\MenuBundle\Document\MenuItem;
> > +use Knp\Menu\FactoryInterface;
> > +use Knp\Menu\NodeInterface;
> > +
> > +/**
> > + * Factory to create a menu from a tree
> > + */
> > +class MenuFactory implements FactoryInterface
> > +{
> 
> What's the use of this class and how is it related to Knp\Menu\MenuFactory? Is it used sonewhere?
> 
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/symfony-cmf/MenuBundle/pull/25/files#r2525857