inuar/attribute-group-readonly-bundle
Composer 安装命令:
composer require inuar/attribute-group-readonly-bundle
包简介
Akeneo PIM bundle to flag attribute groups as read-only on the product edit form.
关键字:
README 文档
README
A Symfony bundle for Akeneo PIM Community Edition that allows you to mark attribute groups as read-only, preventing users from editing any attribute values belonging to those groups on the product edit form.
Features
- Toggle any attribute group as read-only directly from the attribute group edit page (same UI pattern as Data Quality Insights activation).
- Read-only enforcement is visual (fields are disabled in the product edit form) and backend (values stripped before save, protecting against API and CLI writes).
- The read-only state is stored in a dedicated database table and survives cache clears.
- Automatically cleans up the read-only flag when an attribute group is deleted.
Requirements
| Dependency | Version |
|---|---|
| PHP | ^8.1 |
| Symfony | ^5.4 / ^6.x |
| Akeneo PIM CE | ^7.0 |
| Doctrine DBAL | ^3.x |
Installation
- Install the bundle
- Register the bundle
Add the bundle to config/bundles.php:
return [ // ... other bundles Inuar\Bundle\AttributeGroupReadOnlyBundle\InuarAttributeGroupReadOnlyBundle::class => ['all' => true], ];
- Register the routes
Add the following to config/routes/routes.yml:
inuar_attribute_group_readonly: resource: "@InuarAttributeGroupReadOnlyBundle/Resources/config/routing.yml"
- Run the database migration
bin/console doctrine:migrations:migrate
This creates the inuar_readonly_attribute_group table used to store which attribute groups are flagged as read-only.
- Install assets and rebuild the frontend
bin/console assets:install --symlink bin/console pim:installer:dump-require-paths yarn run webpack bin/console cache:clear
Usage
- Go to Settings → Attribute Groups in the Akeneo UI.
- Open any attribute group.
- In the Properties tab, find the Read-Only section.
- Toggle the switch to enable or disable read-only mode for that group.
- All attributes belonging to that group will be immediately locked on the product edit form — visually disabled with a notice, and protected at the backend level.
How it works
Backend enforcement
The bundle decorates Akeneo's pim_catalog.updater.product service. On every product save (UI, API, or import), it queries the read-only attribute groups, resolves all attribute codes belonging to those groups, and strips those values from the update payload before delegating to the original updater.
Frontend enforcement
A form extension listens to the pim_enrich:form:field:extension:add event on the product edit form. For each field whose attribute belongs to a read-only group, it calls field.setEditable(false) and appends a footer note: "This attribute is read-only and cannot be edited."
Database
A single table inuar_readonly_attribute_group stores the codes of read-only attribute groups:
CREATE TABLE inuar_readonly_attribute_group ( attribute_group_code VARCHAR(100) NOT NULL, PRIMARY KEY (attribute_group_code) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
inuar/attribute-group-readonly-bundle 适用场景与选型建议
inuar/attribute-group-readonly-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 05 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「akeneo」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 inuar/attribute-group-readonly-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 inuar/attribute-group-readonly-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 inuar/attribute-group-readonly-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Akeneo Measure Bundle
Extension to connect TESSA to Akeneo
Show attribute codes in product edit form
Simple /phpinfo controller
Put products, models and categories into own trash tables before deleting them in the original tables.
Enhanced Akeneo Spreadsheet parser. Reads XLXS files from Microsoft Excel and Open Office
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 46
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2026-05-04