定制 inuar/attribute-group-readonly-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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.

attribute group read-only

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

  1. Install the bundle
  2. Register the bundle

Add the bundle to config/bundles.php:

return [
    // ... other bundles
    Inuar\Bundle\AttributeGroupReadOnlyBundle\InuarAttributeGroupReadOnlyBundle::class => ['all' => true],
];
  1. Register the routes

Add the following to config/routes/routes.yml:

inuar_attribute_group_readonly:
    resource: "@InuarAttributeGroupReadOnlyBundle/Resources/config/routing.yml"
  1. 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.

  1. 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

  1. Go to Settings → Attribute Groups in the Akeneo UI.
  2. Open any attribute group.
  3. In the Properties tab, find the Read-Only section.
  4. Toggle the switch to enable or disable read-only mode for that group.
  5. 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 我们能提供哪些服务?
定制开发 / 二次开发

基于 inuar/attribute-group-readonly-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 46
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2026-05-04