2018-10-04 21:40:07 +02:00
|
|
|
<?php
|
2018-10-29 19:01:00 +01:00
|
|
|
|
2018-10-04 21:40:07 +02:00
|
|
|
namespace App\Event\Menu;
|
|
|
|
|
|
|
|
use Knp\Menu\FactoryInterface;
|
|
|
|
use Knp\Menu\ItemInterface;
|
|
|
|
use Symfony\Component\EventDispatcher\Event;
|
|
|
|
use Symfony\Component\HttpFoundation\RequestStack;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author kevinfrantz
|
|
|
|
*/
|
2018-10-04 22:05:31 +02:00
|
|
|
class MenuEvent extends Event
|
2018-10-04 21:40:07 +02:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var FactoryInterface
|
|
|
|
*/
|
|
|
|
private $factory;
|
2018-10-29 19:01:00 +01:00
|
|
|
|
2018-10-04 21:40:07 +02:00
|
|
|
/**
|
|
|
|
* @var ItemInterface
|
|
|
|
*/
|
|
|
|
private $item;
|
2018-10-29 19:01:00 +01:00
|
|
|
|
2018-10-04 21:40:07 +02:00
|
|
|
/**
|
|
|
|
* @var RequestStack
|
|
|
|
*/
|
|
|
|
private $request;
|
2018-10-29 19:01:00 +01:00
|
|
|
|
2018-10-04 21:40:07 +02:00
|
|
|
public function __construct(FactoryInterface $factory, ItemInterface $item, RequestStack $request)
|
|
|
|
{
|
|
|
|
$this->factory = $factory;
|
|
|
|
$this->item = $item;
|
|
|
|
$this->request = $request;
|
|
|
|
}
|
2018-10-29 19:01:00 +01:00
|
|
|
|
2018-10-04 21:40:07 +02:00
|
|
|
/**
|
|
|
|
* @return FactoryInterface
|
|
|
|
*/
|
|
|
|
public function getFactory(): FactoryInterface
|
|
|
|
{
|
|
|
|
return $this->factory;
|
|
|
|
}
|
2018-10-29 19:01:00 +01:00
|
|
|
|
2018-10-04 21:40:07 +02:00
|
|
|
/**
|
|
|
|
* @return ItemInterface
|
|
|
|
*/
|
|
|
|
public function getItem(): ItemInterface
|
|
|
|
{
|
|
|
|
return $this->item;
|
|
|
|
}
|
2018-10-29 19:01:00 +01:00
|
|
|
|
2018-10-04 21:40:07 +02:00
|
|
|
/**
|
|
|
|
* @return RequestStack
|
|
|
|
*/
|
|
|
|
public function getRequest(): RequestStack
|
|
|
|
{
|
|
|
|
return $this->request;
|
|
|
|
}
|
2018-10-29 19:01:00 +01:00
|
|
|
}
|