Let the platform do the work

after_ui_frame

Overview

The after_ui_frame hook executes after the frame has been invoked and before the footer has been invoked for modules in backward compatibility mode. This logic hook has been deprecated and will be removed in a future release. 

Definition

  function after_ui_frame($event, $arguments){}

Arguments

Name Type Description
event String The current event
arguments Array Additional information related to the event (typically empty)

Considerations

  • This hook is only applicable for modules in backward compatibility mode.
  • This hook is executed on most views such as the DetailView, EditView, and Listview.
  • Application hooks do not make use of the $bean argument.
  • This is logic hook can be used as a global reference (./custom/modules/logic_hooks.php) or as a module reference (./custom/modules/<module>/logic_hooks.php).

Change Log

Version Note
7.10.0.0 Deprecated after_ui_frame hook
5.0.0a Added after_ui_frame hook

Example

Module-Specific Hook

This hook can be used at the application level for all modules or limited to specific modules. An example limiting the hook for specific modules is shown below:

./custom/modules/<module>/logic_hooks.php

  <?php

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

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

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

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

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

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

?>

./custom/modules/<module>/logic_hooks_class.php

  <?php

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

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

?>

Application Hook

This hook can be used at the application level for all modules or limited to specific modules. An example of executing the hook for all modules is shown below:

./custom/modules/logic_hooks.php

  <?php

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

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

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

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

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

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

?>

./custom/modules/application_hooks_class.php

  <?php

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

    class application_hooks_class
    {
        function after_ui_frame_method($event, $arguments)
        {
            //display logic
        }
    }

?>