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

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

报告相同问题?