dongtuo0828 2013-03-15 03:29
浏览 38
已采纳

为分布式模块填充$ beanList,$ beanFiles和$ moduleList

I want to create a SugarCRM module for redistribution. Where should I populate $beanList, $beanFiles, and $moduleList?

That is, if I use the module generator to create a SugarCRM module, the system will auto generate the following file

custom/application/Ext/Include/modules.ext.php

which populates the three global variables $beanList, $beanFiles, and $moduleList with something like this (assuming a module name of pshw_Helloworld.

$beanList['pshw_Helloworld'] = 'pshw_Helloworld';
$beanFiles['pshw_Helloworld'] = 'modules/pshw_Helloworld/pshw_Helloworld.php';
$moduleList[] = 'pshw_Helloworld';

This works great for a local system — but if I wanted to redistribute a module (offered for downloading online, deployed to multiple offices, etc.), should I be instructing people to populate the modules.ext.php or modules_override.php file themselves? Or is there a more elegant way of redistributing a SugarCRM module that uses a bean?

  • 写回答

1条回答 默认 最新

  • douxuan4556 2013-03-15 03:37
    关注

    This is all done automatically by including a manifest.php in your module zip. The Module Loader will read the manifest and create these entries for you. The key is the 'beans' key in the $installdefs array. More info can be found here: Introduction to the Manifest File

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 方程如何编到C语言!
  • ¥20 关于#qt#的问题:Qt代码的移植问题
  • ¥50 求图像处理的matlab方案
  • ¥50 winform中使用edge的Kiosk模式
  • ¥15 关于#python#的问题:功能监听网页
  • ¥15 怎么让wx群机器人发送音乐
  • ¥15 fesafe材料库问题
  • ¥35 beats蓝牙耳机怎么查看日志
  • ¥15 Fluent齿轮搅油
  • ¥15 八爪鱼爬数据为什么自己停了