Suite CRM调用要先全局声明—Suite CRM二次开发

SuiteCRM 全功能,不限用户

SuiteCRM 与 Salesforce 和 Dynamics 一样强大,具有更高的技术独立性和定制性。业务咨询与服务,请联系:188-9654-1629

我们提供的服务包括:插件开发、主题开发、安装和配置、CRM升级、CRM部署、支持与维护、用户培训…

Suite CRM $mod_strings, $app_strings 和 $app_list_strings 变量都是全局变量,因此可以访问。 $app_strings 和 $app_list_strings将始终可用。然而$mod_strings 将仅包含当前模块的字符串(有关其他访问方式,请参见下一节 $mod_strings)。

全局访问语言字符串

function someFunction(){
    global $mod_strings, $app_strings, $app_list_strings;
    /*
     * Grab the label LBL_NAME for the current module
     * In most modules this will be the label for the
     * name field of the module.
     */
    $modLabel = $mod_strings['LBL_NAME'];

    $appLabel = $app_strings['LBL_GENERATE_LETTER'];

    /*
     * Unlike the previous two examples $appListLabel will be an
     * array of the dropdowns keys to it's display labels.
     */
    $appListLabel = $app_list_strings['aos_quotes_type_dom'];

    //Here we just log out the strings
    $GLOBALS['log']->debug("The module label is $modLabel");
    $GLOBALS['log']->debug("The app label is $appLabel");
    $GLOBALS['log']->debug("The app list label is ".print_r($appListLabel,1));
}
 全局访问语言字符串
全局访问语言字符串
滚动至顶部