Completed
Push — allow-no-default-tax-zone-in-c... ( 67cea0 )
by Kamil
06:23
created

PromotionMenuBuilderEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
cc 1
nc 1
nop 3
1
<?php
2
3
/*
4
 * This file is part of the Sylius package.
5
 *
6
 * (c) Paweł Jędrzejewski
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Sylius\Bundle\AdminBundle\Event;
15
16
use Knp\Menu\FactoryInterface;
17
use Knp\Menu\ItemInterface;
18
use Sylius\Bundle\UiBundle\Menu\Event\MenuBuilderEvent;
19
use Sylius\Component\Core\Model\PromotionInterface;
20
21
final class PromotionMenuBuilderEvent extends MenuBuilderEvent
22
{
23
    /** @var PromotionInterface */
24
    private $promotion;
25
26
    public function __construct(
27
        FactoryInterface $factory,
28
        ItemInterface $menu,
29
        PromotionInterface $promotion
30
    ) {
31
        parent::__construct($factory, $menu);
32
33
        $this->promotion = $promotion;
34
    }
35
36
    public function getPromotion(): PromotionInterface
37
    {
38
        return $this->promotion;
39
    }
40
}
41