<?php declare(strict_types=1);
namespace Weedesign\Images2WebP\Listener;
use Symfony\Component\HttpKernel\Event\ResponseEvent;
use Shopware\Core\System\SystemConfig\SystemConfigService;
class ResponseListener
{
private SystemConfigService $systemConfigService;
public function __construct(
SystemConfigService $systemConfigService
)
{
$this->systemConfigService = $systemConfigService;
}
/**
* @param ResponseEvent $event
*/
public function onKernelResponse(ResponseEvent $event): void
{
$this->systemConfigService->set('WeedesignImages2WebP.config.webpCount', 0);
}
}