custom/plugins/PayonePayment/src/EventListener/DocumentOrderEventListener.php line 20

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace PayonePayment\EventListener;
  4. use PayonePayment\DataAbstractionLayer\Extension\PayonePaymentOrderTransactionExtension;
  5. use Shopware\Core\Checkout\Document\Event\DocumentOrderCriteriaEvent;
  6. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  7. class DocumentOrderEventListener implements EventSubscriberInterface
  8. {
  9.     public static function getSubscribedEvents(): array
  10.     {
  11.         return [
  12.             DocumentOrderCriteriaEvent::class => 'addPayonePaymentTransactionDataExtensionAssociation',
  13.         ];
  14.     }
  15.     public function addPayonePaymentTransactionDataExtensionAssociation(DocumentOrderCriteriaEvent $event): void
  16.     {
  17.         $criteria $event->getCriteria();
  18.         $criteria->addAssociation('transactions.' PayonePaymentOrderTransactionExtension::NAME);
  19.     }
  20. }