heimrichhannot/contao-entity-approval-bundle
Composer 安装命令:
composer require heimrichhannot/contao-entity-approval-bundle
包简介
This bundle offers customizable approval process for all entities for the Contao CMS.
README 文档
README
Requirements
- PHP: ^7.4
- Contao: ^4.9
Installation
composer require heimrichhannot/contao-entity-approval-bundle
Features
- all entities can be configured for approval
- approval entities can only be set visible if approved
- admin can set visible without approval
- sends emails on entity status change or on transition
- unlimited approval steps
Workflow
for automatic creation of workflow diagram, just use the following command:
vendor/bin/contao-console workflow:dump entity_approval | dot -Tpng -o vendor/heimrichhannot/contao-entity-approval-bundle/docs/img/approval-process.jpg
External Components
Symfony Workflow component: https://symfony.com/doc/current/components/workflow.html
Symfony String component: https://symfony.com/doc/current/components/string.html
Configuration
All entities can be configured for approval workflow by setting it up in the config.yml. Example below show a config for tl_submission entity(see option comments for more information)
example config.yml
huh_entity_approval: # Entity name( table name ) tl_submission: # approval steps with options: # ['name'] will be used to field names # ['groups'] is array of usergroups for approval in each step # ['mode'] is used for choosing of a user from groups : possible values (random, all) auditor_levels: - { name: "primary", groups: [ 10 ], mode: 'random' } - { name: "secondary", groups: [ 11,12,13,14,17,18 ], mode: 'random' } # entity field where the author email address is saved (used for notifications) author_email_field: email # notifications to be sent on state change or transition emails: auditor_changed_former: true auditor_changed_new: true state_changed_author: true
Contao limitations
Some Entities will show approval fields after these fields are set visible in the entity archive settings (eg. tl_submission)
Usergroup permissions need to be set for every entity and approval field, to be displayed in the backend.
Events
PHP events
Events are fired as symfony events.
| Event name | Description |
|---|---|
| BeforeEntityGetModelEvent | Used to modify approval entity before display in Backend |
heimrichhannot/contao-entity-approval-bundle 适用场景与选型建议
heimrichhannot/contao-entity-approval-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 39 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 09 月 29 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 heimrichhannot/contao-entity-approval-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 heimrichhannot/contao-entity-approval-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 39
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: LGPL-3.0-or-later
- 更新时间: 2021-09-29
