Sugarcrm支持产品指南糖开发人员糖开发人员指南10.3建筑学逻辑钩子API钩子after_routing.
此版本仅适用于Sugarcloud客户。

after_routing.

概述

The after_routing. hook executes when the v10+ REST Service has found the route for the request.

定义

function after_routing($event, $arguments){}

争论

名称 类型 描述
事件 细绳 逻辑3d彩吧论坛事件的名称
争论 大批 与活动有关的其他信息
争论.api. 目的 restservice对象
争论.request. 目的 restresponse对象

考虑

  • This is a global logic hook where the logic hook reference must be placed in ./custom/modules/logic_hooks.php..
  • 此3d彩吧论坛可以更改影响路由的请求对象参数。
  • 此3d彩吧论坛不应用于任何类型的显示输出。

更改日志

版本 笔记
7.0.0RC1. Added after_routing. hook

例子

./custom/modules/logic_hooks.php.

<?php

    $hook_version = 1;
    $hook_array = Array();

    $hook_array['after_routing'] = Array();
    $hook_array['after_routing'][] = Array(
        //Processing index. For sorting the array.
        1, 

        //Label. A string value to identify the hook.
        'after_routing example', 

        //The PHP file where your class is located.
        'custom/modules/logic_hooks_class.php',

        //The class the method is in. 
        'logic_hooks_class',

        //The method to call. 
        'after_routing_method' 
    );

?>

./custom/modules/logic_hooks_class.php.

<?php

    if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

    class logic_hooks_class
    {
        function after_routing_method($event, $arguments)
        {
            //logic
        }
    }

?> 

最后修改:2021-01-06 23:28:41