public function saveComment(OrderEvent $orderEvent) { $comment = $this->request->getSession()->get('order-comment'); $order = $orderEvent->getOrder(); $orderId = $order->getId(); if ($orderId != null && $comment != null) { $orderComment = new OrderComment(); $orderComment->setOrderId($orderId); $orderComment->setComment($comment); $orderComment->save(); $this->request->getSession()->set('order-comment', ''); } }