/** * Creates the acknowledgment notification for a form. * @param form_persistentdocument_baseform $form */ protected function createacknowledgmentNotification($form) { $notification = notification_NotificationService::getInstance()->getNewDocumentInstance(); $notification->setLabel(f_Locale::translateUI('&modules.form.document.form.Acknowledgment-notification-label-prefix;') . ' ' . $form->getLabel()); $notification->setCodename($form->getFormid() . '_acknowledgmentNotification'); $notification->setTemplate('default'); $notification->setSubject($form->getLabel()); $notification->setBody($this->getDefaultAcknowledgmentNotificationBody()); if ($form->getId() > 0) { $notification->setAvailableparameters(implode("\n", $this->getFieldRemplacementsForNotification($form))); } $notification->save(ModuleService::getInstance()->getSystemFolderId('notification', 'form')); $form->setacknowledgmentNotification($notification); }