我有这个建设者
namespace Telnet\CSSBundle\Menu;
use Knp\Menu\FactoryInterface;
use Symfony\Component\DependencyInjection\ContainerAware;
class Builder extends ContainerAware
{
public function mainMenu(FactoryInterface $factory, array $options)
{
$menu = $factory->createItem('Main Menu');
$menu->addChild('Главная', array('route' => 'pages_index'));
$menu->addChild('Форум', array('uri' => '/forum'));
$menu->addChild('Демки', array('route' => 'pages_dem'));
$menu->addChild('SourceBans', array('uri' => '/sourcebans'));
$menu->addChild('HLStatsX', array('uri' => '/hlstatx'));
return $menu;
}
}
如何在任何操作中获取此菜单以设置当前项目?