定制 thedmsgroup/mautic-extended-field-bundle 二次开发

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

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

thedmsgroup/mautic-extended-field-bundle

Composer 安装命令:

composer require thedmsgroup/mautic-extended-field-bundle

包简介

Extends custom fields for scalability and HIPAA/PCI compliance.

README 文档

README

Features:

  • Allows for hundreds of custom fields.
  • Prevents outages due to field additions/deletions at large scale (when used exclusively).
  • Allows for separation of data for those with HIPAA/PCI concerns.

Out of the box Mautic has a few challenges for companies that need hundreds of fields, or to store millions of leads. A full problem definition can be found at mautic/mautic#4139. This plugin is a compromise between a strict EAV approach and current custom field support, and allows an admin to disable the core "Contact" fields in favor of Extended fields if needed.

Plugin Overview

New Schema Structure

When creating a custom field, rather than adding a column to either the Lead (leads) or Company (companies) tables, This plugin implements new tables based on field type (boolean, text, choice, etc), and similar tables for secure data fields. A total of 14 new tables are created following the table name syntax:

 `leads_fields_leads . [DATA TYPE] . xref`   OR
 `leads_fields_lead . [DATA TYPE] . _secure_xref`

Each table contains the columns:

 `lead_id` - the id of the lead from the `leads` table the row applies to
 `lead_field_id` - the id of the corresponding Custom Field from the `lead_fields` table
 `value` - the value for the Custom Field. 

Overriding Mautic Lead Bundle

This plugin takes two approaches to overriding current methods for managing custom fields.

To allow for new Object types for Custom Fields, three form types are overridden using Symfony's Form Inheritance. By declaring a Form Inheritance tag in the plugin's config the build method of the original Form Type can be overridden to allow this plugin to redefine the form, injecting two new validated Object Types - Extended Field and Secure Extended Field. This Plugin overrides the FieldType, LeadType and ListType form definitions.

The other method of overriding the Mautic Lead Bundle is Symfony's Compiler Pass method. This allows the plugin to redirect the Classes used for service definitions from the Mautic Lead Bundle to use Classes defined by this plugin. The following services were redefined using this method:

`mautic.lead.model.field`
`mautic.form.type.leadfield`
`mautic.lead.model.lead`
`mautic.lead.repository.lead`
`mautic.lead.model.list`

Installation & Usage

Choose a release that matches your version of Mautic.

Mautic version Installation
2.12.x composer require thedmsgroup/mautic-extended-field-bundle "^2.12"
2.14.x composer require thedmsgroup/mautic-extended-field-bundle "^2.14"
2.15.x composer require thedmsgroup/mautic-extended-field-bundle "^2.15"
  1. Install by running the command above or by downloading the appropriate version and unpacking the contents into a folder named /plugins/MauticExtendedFieldBundle
  2. Go to /s/plugins/reload. The Extended Fields plugin should show up. Installation is complete.
  3. When creating new custom fields /s/contacts/fields/new select Object "Extended" or "Extended Secure".
  4. Optionally disable "core" lead fields in ExtendedField Settings /s/config/edit.

TODO

  • Permissions for Secure fields -- Need to implement Permission pass methods for any ExtendedFieldSecure data type display, edit or retrieval.
  • Support retrieving leads by unique IDs that are also extended fields. -- Override LeadRepository::getLeadIdsByUniqueFields to join and pivot on columns.
  • Support segmentation by an "empty" extended field (outer join).

Changes for Report Compatibility

** NOTE ** The ReportSubscriber event listener dynamically checks for an edit or
view request of reports and dynanically sets priority of the REPORT_ON_BUILD.
The REPORT_ON_BUILD and REPORT_ON_GENERATE subscribers exist specifically to add
UTM Tags into the Segment Membership Data Source. This is tangental functionality to the core "Extended Fields" purpose
and will hopefully go away pending approval of a Core modification that adds UTM Tags into the contacts column list.

Icon by lakshishasri from the Noun project.

thedmsgroup/mautic-extended-field-bundle 适用场景与选型建议

thedmsgroup/mautic-extended-field-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.14k 次下载、GitHub Stars 达 29, 最近一次更新时间为 2018 年 02 月 07 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「plugin」 「marketing」 「Marketing Automation」 「Mautic」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 thedmsgroup/mautic-extended-field-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 thedmsgroup/mautic-extended-field-bundle 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

  • Stars: 29
  • Watchers: 26
  • Forks: 24
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-only
  • 更新时间: 2018-02-07