1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <?php
- /*
- * This file is part of the Sonata Project package.
- *
- * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
- namespace Sonata\AdminBundle\Event;
- use Knp\Menu\FactoryInterface;
- use Knp\Menu\ItemInterface;
- use Symfony\Component\EventDispatcher\Event;
- /**
- * Menu builder event. Used for extending the menus.
- *
- * @author Martin Hasoň <martin.hason@gmail.com>
- */
- class ConfigureMenuEvent extends Event
- {
- const SIDEBAR = 'sonata.admin.event.configure.menu.sidebar';
- /**
- * @var FactoryInterface
- */
- private $factory;
- /**
- * @var ItemInterface
- */
- private $menu;
- /**
- * @param FactoryInterface $factory
- * @param ItemInterface $menu
- */
- public function __construct(FactoryInterface $factory, ItemInterface $menu)
- {
- $this->factory = $factory;
- $this->menu = $menu;
- }
- /**
- * @return FactoryInterface
- */
- public function getFactory()
- {
- return $this->factory;
- }
- /**
- * @return ItemInterface
- */
- public function getMenu()
- {
- return $this->menu;
- }
- }
|