public function buildNotificationsByTemplateWarningSms(array $smsWarningList, SettingDecimal $settingStudentWarningLimit)
 {
     $smsWarningMessageList = [];
     foreach ($smsWarningList as $notification) {
         $smsMessage = $this->_translator->trans('sms.warning', ['%setting_student_warning_limit%' => $settingStudentWarningLimit->getSettingValue(), '%student%' => $notification->getStudent()->getName()], 'notifications', 'ua');
         $notification->setSmsMessage($smsMessage);
         $smsWarningMessageList[] = $notification;
     }
     return $smsWarningMessageList;
 }
 public function recordNotification(Notification $notification, SettingDecimal $settingSmsExchangeRate)
 {
     if (!$notification->getStudent()) {
         return FALSE;
     }
     if (!$notification->getStudent()->getNfcTag()) {
         return FALSE;
     }
     $item = $this->getNotificationMessageItem();
     $price = bcmul($notification->getPrice(), $settingSmsExchangeRate->getSettingValue(), 2);
     $purchaseService = $this->getPurchaseService();
     $purchaseService->setStudent($notification->getStudent())->setNfcTag($notification->getStudent()->getNfcTag())->setItem($item)->setPrice($price)->setPurchasedAt(new DateTime());
     $this->_manager->persist($purchaseService);
 }