/** * Creates the notification that is bound to the form. * @param form_persistentdocument_form $form */ protected function createNotification($form) { $notification = notification_NotificationService::getInstance()->getNewDocumentInstance(); $notification->setLabel($form->getLabel()); $notification->setCodename($form->getFormid() . '_notification'); $notification->setTemplate('default'); $notification->setSubject($form->getLabel()); $notification->setBody('{' . self::CONTENT_REPLACEMENT_NAME . '}'); $notification->save(ModuleService::getInstance()->getSystemFolderId('notification', 'form')); $form->setNotification($notification); }