eclipse for php url:
http://update.phpeclipse.com/update/stable/1.2.x
application modules metadata:
include/modules.php
include/modules_override.php
custom/application/Ext/Include/modules.ext.php
studio创建修改subpanel流程:
修改contacts模块下的leads subpanel,去除email列
1、
生成
custom/Extension/modules/Contacts/Ext/Layoutdefs/layoutdefs.ext.php
内容 ,主要用于aSubPanel加载subpanel时的客户化路径
$layout_defs['Contacts']['subpanel_setup']['leads']['override_subpanel_name'] = 'Contact_subpanel_leads';
生成
custom/modules/Leads/metadata/subpanels/Contact_subpanel_leads.php
内容 ,主要用于aSubPanel加载subpanel客户化文件
$subpanel_layout['list_fields'] = array ............. (对应modules/Leads/metadata/subpanels/default.php or ForXXX.php)
(即将所有custom/Extension/modules/Ext/Layoutdefs/layoutdefs.ext.php目录下内容合并)
$layout_defs['Contacts']['subpanel_setup']['leads']['override_subpanel_name'] = 'Contact_subpanel_leads';
返回模块detailview,工作流程(部分)
1、SubpanelTiles.php会调用SubPanelDefinitions去查找用户访问模块所对应的metadata文件
SubPanelDefinitions -> open_layout_defs() 会去查找所访问模块的metadata文件,按照如下顺序加载(后者覆盖前者):
require ('modules/' . $this->_focus->module_dir . '/metadata/subpaneldefs.php') ;
require ('custom/modules/' . $this->_focus->module_dir . '/Ext/Layoutdefs/layoutdefs.ext.php') ; (此文件中内容需repair后才能被加载)
2、遍历$layout_defs['ModulesName'] ['subpanel_setup']数组,调用 的SubpanelTiles.php中的 SubPanelDefinitions -> load_subpanel()
3、 load_subpanel()方法中主要是实例化一个aSubPanel对象,aSubPanel构造函数中会去找subpanels的metadata文件,按照如下顺序加载(假设加载的是leads模块):
modules/Leads/metadata/subpanels/default.php or ForXXX.php
- custom/modules/Leads/metadata/subpanels/$layout_defs['Contacts']['subpanel_setup']['leads']['override_subpanel_name'] .php(Contact_subpanel_leads.php)