<?php declare(strict_types=1);
/*
* (c) shopware AG <info@shopware.com>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Swag\FlowBuilderProfessional\Core\Content\Flow\Subscriber;
use Shopware\Core\Framework\Event\BusinessEventCollectorEvent;
use Swag\FlowBuilderProfessional\Core\Framework\Event\WebhookAware;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class BusinessEventCollectorSubscriber implements EventSubscriberInterface
{
public static function getSubscribedEvents()
{
return [
BusinessEventCollectorEvent::NAME => 'addWebhookAware',
];
}
public function addWebhookAware(BusinessEventCollectorEvent $event): void
{
foreach ($event->getCollection()->getElements() as $definition) {
$definition->addAware(WebhookAware::class);
}
}
}