Sugarcrm支持产品指南糖开发人员糖开发人员指南10.0建筑学延期旁章

旁章

概述

The 旁章 extension installs metadata files to their appropriate directories.

特性

可用以下扩展属性。有关更多信息,请参阅 延期财产 documentation.

财产 价值
扩展范围 模块
糖变量 $ viewdefs.
扩展目录 。/风俗/extension/modules/<module>/Ext/clients/<client>/<type>/<subtype>/
编译扩展文件 。/风俗/<module>/Ext/clients/<client>/<type>/<subtype>/<subtype>.ext.php
清单installdef. $ installdefs ['sidecar']

执行

以下部分说明了为糖实例实现自定义的各种方式。

文件系统

When working directly with the filesystem, you can create a file in 。/风俗/extension/modules/<module>/Ext/clients/<client>/<type>/<subtype>/ to append the metadata extensions. The example below demonstrates how to add a new subpanel to a specific module:

。/风俗/extension/modules/<module>/ EXT / CLIENCE / BASE / BULOUTS / SUBPANELS /<file>.php

<?php

$viewdefs['<module>']['base']['layout']['subpanels']['components'][] = array(
    'layout' => 'subpanel',
    'label' => 'LBL_RELATIONSHIP_TITLE',
    'context' => array(
        'link' => '<link_name>',
    )
);

接下来,导航到admin> Repair >快速修复和重建。然后系统将重建扩展并编译您的自定义 。/风俗/modules/<module>/ EXT / CLIENCE / BASE / BULOUTS / SUBPANELS /subpanels.ext.php

模块可加载包装

When building a module loadable package, you can use the $ installdefs ['sidecar'] index to install the metadata file.

installdef属性

名称 类型 描述
细绳

要安装的文件的基本路径

笔记: When adding the file to a module loadable package, its 'from' path must be formatted as 客户s/<client>/<type>/<subtype>/<file>.php for Sugar to recognize the installation location.

to_module. 细绳
  • 将安装文件的模块的键
  • 如果没有填充,则使用“应用程序”

The example below demonstrates the proper install definition that should be used in the ./manifest.php. 文件 in order to add the metadata file to a specific module. When using this approach, Sugar will automatically execute Rebuild Extensions and Metadata Rebuild to reflect your changes in the system.

./manifest.php.

<?php

$manifest = array( 
    ... 
); 

$installdefs = array (
    'id' => 'sidecar_example',
    'sidecar' => array(
        array(
            'from' => '<basepath>/Files/custom/<module>/clients/base/layouts/subpanels/<file>.php',
            'to_module' => '<module>',
        ),
    ),
);

Alternatively, you may use the $installdefs['copy'] index to copy the file. When using this approach, you may need to manually run repair actions such as a Quick Repair and Rebuild. For more information on the $installdefs['copy'] index and module-loadable packages, please refer to the 介绍清单 page.

最后修改:2020-03-16 17:00:15