Completed
Push — 3.x ( e95e95...638cd1 )
by Oskar
05:54
created

src/Event/ConfigureMenuEvent.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Sonata Project package.
7
 *
8
 * (c) Thomas Rabaix <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Sonata\AdminBundle\Event;
15
16
use Knp\Menu\FactoryInterface;
17
use Knp\Menu\ItemInterface;
18
use Symfony\Component\EventDispatcher\Event;
19
20
/**
21
 * Menu builder event. Used for extending the menus.
22
 *
23
 * @author Martin Hasoň <[email protected]>
24
 */
25
class ConfigureMenuEvent extends Event
0 ignored issues
show
Deprecated Code introduced by
The class Symfony\Component\EventDispatcher\Event has been deprecated with message: since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event" instead

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
26
{
27
    public const SIDEBAR = 'sonata.admin.event.configure.menu.sidebar';
28
29
    /**
30
     * @var FactoryInterface
31
     */
32
    private $factory;
33
34
    /**
35
     * @var ItemInterface
36
     */
37
    private $menu;
38
39
    public function __construct(FactoryInterface $factory, ItemInterface $menu)
40
    {
41
        $this->factory = $factory;
42
        $this->menu = $menu;
43
    }
44
45
    /**
46
     * @return FactoryInterface
47
     */
48
    public function getFactory()
49
    {
50
        return $this->factory;
51
    }
52
53
    /**
54
     * @return ItemInterface
55
     */
56
    public function getMenu()
57
    {
58
        return $this->menu;
59
    }
60
}
61