<?php
namespace App\EventListener\Client\Store;
use App\Entity\Client\Store\StoreCentral;
use App\Entity\Client\Store\StoreStock;
use App\EventListener\GenericEvent;
use App\Service\Client\Store\StoreStockManager;
class StoreStockListener
{
private $storeStockManager;
public function __construct(StoreStockManager $storeStockManager)
{
$this->storeStockManager = $storeStockManager;
}
public function pre(GenericEvent $genericEvent)
{
if (!$genericEvent->getSubject() instanceof StoreStock) {
return;
}
$this->storeStockManager->pre($genericEvent);
}
}