reluem/contao-nc-file-gateway
Composer 安装命令:
composer require reluem/contao-nc-file-gateway
包简介
Restores the Notification Center 1.x file/CSV gateway for Notification Center 2
README 文档
README
Contao bundle that restores the file/CSV gateway removed in Notification Center 2.
In NC 1.x you could append form submissions to a CSV file and optionally attach that file to notification emails. NC 2 dropped this gateway type. This bundle brings it back using the official NC 2 architecture (gateways, parcels, bulky-item vouchers).
Typical use case: store every form submission in a CSV under files/ and send the same CSV as an email attachment to an internal recipient.
Requirements
- PHP 8.1+
- Contao 4.13.50+ or Contao 5.3+
terminal42/notification_center^2.6
Installation
composer require reluem/contao-nc-file-gateway
Then run migrations and clear the cache:
php vendor/bin/contao-console contao:migrate --no-interaction php vendor/bin/contao-console cache:clear
Backend setup
1. Create a file gateway
Notification Center → Gateways → New gateway
| Field | Example |
|---|---|
| Type | File/CSV |
| Export folder | pick exports/form-submissions in the file manager |
2. Add a file message to your notification
Notification Center → Notifications → your notification → Messages → New message
| Field | Example |
|---|---|
| Gateway | your file gateway |
| File name | submissions.csv |
| Storage mode | Append |
| File content | {{date::d.m.Y H:i}};##form_lastname##;##form_firstname##;##form_email## |
The file content field defines one CSV line per submission. Use semicolons, simple tokens (##form_*##), and insert tags ({{date::…}}) as needed.
Important: sort this message before any mailer message in the same notification.
Email integration
To attach the CSV to an outgoing email in the same notification:
-
Create (or edit) a mailer message in the same notification.
-
Set the mailer message sorting lower than the file message (file message runs first).
-
In the mailer message language settings, add this token to Attachment tokens:
##nc_file_voucher## -
Configure recipients, subject, and body as usual.
Example notification layout:
| Sorting | Message | Gateway | Purpose |
|---|---|---|---|
| 1 | Save CSV | File/CSV | Writes/appends the CSV line |
| 2 | Internal notification | Contao Mailer | Sends email with CSV attached |
When the form is submitted, NC processes messages in order:
- The file message writes the new line to the configured CSV.
- The mailer message picks up the voucher from step 1 and attaches the current CSV file to the email.
You can combine ##nc_file_voucher## with other attachment tokens if needed.
How it works
- NC creates parcels for all messages in sorting order.
- For file messages,
FileExportListenerappends the CSV line and stores a bulky-item voucher. - For mailer messages with
##nc_file_voucher##,MailerFileAttachmentListeneradds that voucher as an attachment.
Migration from NC 1.x
If NC 2 already dropped the old file_* columns, this bundle's migration re-adds:
tl_nc_gateway.file_type,tl_nc_gateway.file_pathtl_nc_language.file_name,tl_nc_language.file_storage_mode,tl_nc_language.file_content
Existing language records keep their values if the columns were preserved in your database.
License
LGPL-3.0-or-later
reluem/contao-nc-file-gateway 适用场景与选型建议
reluem/contao-nc-file-gateway 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 07 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「file」 「csv」 「form」 「gateway」 「contao」 「notification-center」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 reluem/contao-nc-file-gateway 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 reluem/contao-nc-file-gateway 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 reluem/contao-nc-file-gateway 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
The file manager intended for using Laravel with CKEditor / TinyMCE / Colorbox
Diese Contao 4 Erweiterung stellt Google reCAPTCHA V2 in Form eines neuen Formularfeldes im Formulargenerator bereit. This extension provides Google reCAPTCHA V2 in the form of a new form field in the form generator of Contao Open Source CMS.
A Laravel Filament Forms slug field.
Laravel Media Popup to upload/view the files
laravel facade to read/write csv file
A jQuery augmented PHP library for creating and validating HTML forms
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: LGPL-3.0-or-later
- 更新时间: 2026-07-15