refactoring of AbListener

This commit is contained in:
Simon Vieille 2022-05-21 00:38:41 +02:00
parent a16f4f998e
commit 6e0a4107c7
Signed by: deblan
GPG key ID: 579388D585F70417

View file

@ -21,19 +21,16 @@ use Symfony\Component\HttpKernel\Event\ResponseEvent;
*/ */
class AbListener class AbListener
{ {
protected NodeRepository $nodeRepository;
protected EventDispatcherInterface $eventDispatcher; protected EventDispatcherInterface $eventDispatcher;
protected AbContainer $container; protected AbContainer $container;
protected SiteRequest $siteRequest; protected SiteRequest $siteRequest;
protected ?Node $node; protected ?Node $node;
public function __construct( public function __construct(
NodeRepository $nodeRepository,
AbContainer $container, AbContainer $container,
EventDispatcherInterface $eventDispatcher, EventDispatcherInterface $eventDispatcher,
SiteRequest $siteRequest SiteRequest $siteRequest
) { ) {
$this->nodeRepository = $nodeRepository;
$this->eventDispatcher = $eventDispatcher; $this->eventDispatcher = $eventDispatcher;
$this->container = $container; $this->container = $container;
$this->siteRequest = $siteRequest; $this->siteRequest = $siteRequest;