Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/229.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php SugarCRM逻辑钩子从CE迁移到专业问题_Php_Sugarcrm - Fatal编程技术网

Php SugarCRM逻辑钩子从CE迁移到专业问题

Php SugarCRM逻辑钩子从CE迁移到专业问题,php,sugarcrm,Php,Sugarcrm,我使用的是SugarCRM 6.8CE,我的逻辑挂钩工作正常。然而,当我切换到SugarPro-Full-7.8.2.0时,逻辑挂钩根本不起作用。我正在跟踪文档。我的代码如下 SugarPro-Full-7.8.2.0/custom/modules/Accounts/logic_hooks.php <?php $hook_array['after_ui_frame'] = Array(); $hook_array['after_ui_frame'][] = Array(2, 'After

我使用的是SugarCRM 6.8CE,我的逻辑挂钩工作正常。然而,当我切换到SugarPro-Full-7.8.2.0时,逻辑挂钩根本不起作用。我正在跟踪文档。我的代码如下

SugarPro-Full-7.8.2.0/custom/modules/Accounts/logic_hooks.php

<?php

$hook_array['after_ui_frame'] = Array();
$hook_array['after_ui_frame'][] = Array(2, 'After Relationship Add','custom/Extension/modules/Accounts/Ext/LogicHooks/account_hooks.php','AccountHooks','generateOWQ');

?>
<?php
    if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

    class AccountHooks{

        function generateOWQ($event, $arguments){
           //my logic
        }
    }

?>

SugarPro-Full-7.8.2.0/custom/modules/Accounts/Ext/LogicHooks/account_hooks.php

<?php

$hook_array['after_ui_frame'] = Array();
$hook_array['after_ui_frame'][] = Array(2, 'After Relationship Add','custom/Extension/modules/Accounts/Ext/LogicHooks/account_hooks.php','AccountHooks','generateOWQ');

?>
<?php
    if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

    class AccountHooks{

        function generateOWQ($event, $arguments){
           //my logic
        }
    }

?>

after\u ui\u frame钩子是一个遗留MVC钩子,不适用于Sugar 7中的Accounts模块

正如报告指出的那样:


对于处于向后兼容模式的模块,
在调用框架之后、在调用页脚之前执行
after\u ui\u frame
钩子

(强调矿山)

大多数Sugar 7模块(包括Accounts)都使用Sugar在客户端构建用户界面。 这些模块不会在backwards-c兼容模式下运行,也不会调用此挂钩。只有URL中带有
#bwc
的非侧车模块才可以

根据你的逻辑需要做的事情,考虑使用一个不同的钩子,例如


如果您的代码还需要修改UI,那么您可能需要在客户端执行操作,例如。

任何错误消息无错误我已检查了日志