vendor/store.shopware.com/lenzplatformclp/src/Subscriber/ProductGatewayCriteriaEventSubscriber.php line 16

Open in your IDE?
  1. <?php
  2. namespace LenzPlatformClp\Subscriber;
  3. use Shopware\Core\Content\Product\Events\ProductGatewayCriteriaEvent;
  4. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  5. class ProductGatewayCriteriaEventSubscriber implements EventSubscriberInterface
  6. {
  7.     public static function getSubscribedEvents()
  8.     {
  9.         return [
  10.             ProductGatewayCriteriaEvent::class => 'onEvent'
  11.         ];
  12.     }
  13.     public function onEvent(ProductGatewayCriteriaEvent $event) {
  14.         $event->getCriteria()->addAssociation('lenzPlatformClp');
  15.     }
  16. }