Completed
Push — master ( 9de44c...cc28ed )
by Paweł
21:07 queued 20:52
created

ProductMenuBuilderEvent::getProduct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
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
namespace Sylius\Bundle\AdminBundle\Event;
13
14
use Knp\Menu\FactoryInterface;
15
use Knp\Menu\ItemInterface;
16
use Sylius\Bundle\UiBundle\Menu\Event\MenuBuilderEvent;
17
use Sylius\Component\Product\Model\ProductInterface;
18
19
/**
20
 * @author Jan Góralski <[email protected]>
21
 */
22
class ProductMenuBuilderEvent extends MenuBuilderEvent
23
{
24
    /**
25
     * @var ProductInterface
26
     */
27
    private $product;
28
29
    /**
30
     * @param FactoryInterface $factory
31
     * @param ItemInterface $menu
32
     * @param ProductInterface $product
33
     */
34
    public function __construct(FactoryInterface $factory, ItemInterface $menu, ProductInterface $product)
35
    {
36
        parent::__construct($factory, $menu);
37
38
        $this->product = $product;
39
    }
40
41
    /**
42
     * @return ProductInterface
43
     */
44
    public function getProduct()
45
    {
46
        return $this->product;
47
    }
48
}
49