How to access request data in subscriber in shopware 6

Viewed 1248

I have built a subscriber in my plugin for Shopware 6 that subscribes to 'framework.validation.address.create' => 'onAddressCreation' event in order to add extra validation definition. But I also need to be able to access request data in the subscriber action.

How can I do that? So far I have managed to inject Shopware\Core\System\SystemConfig\SystemConfigService in the subscriber constructor and the subsriber action receives Shopware\Core\Framework\Validation\BuildValidationEvent but there is no way to get to the address fields with those two classes.

1 Answers
Related