public function onAfterCreate(OrderEvent $event) { $emailAddress = $this->getEmailAddress($event); $customerName = $this->getCustomerName($event); $this->communicationService->sendConfirmationEmail($emailAddress, $customerName, $event->getOrder()->getId()); }