承接 inuar/attribute-group-readonly-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

inuar/attribute-group-readonly-bundle

最新稳定版本:2.0.0

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;

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固