public function onOrderCreatedEvent(OrderEvent $event) { $order = $event->getOrder(); // email for owner $this->sendMail($this->ownerRecipient, '_mail/owner_notification.html.twig', array('order' => $order)); // email for customer $this->sendMail(array($order->getEmail() => $order->getFullname()), '_mail/customer_notification.html.twig', array('order' => $order)); // sms for owner $this->twilio->notifyOwner($this->twig->render('_sms/owner_notification.html.twig', array('order' => $order))); }
public function onOrderCreatedEvent(OrderEvent $event) { $order = $event->getOrder(); $this->sendMail($this->ownerRecipient, '_mail/owner_notification.html.twig', array('order' => $order)); }