Let the platform do the work

after_ui_footer

Overview

The after_ui_footer hook executes after 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. For information on modifying the footer, please refer to Adding Buttons to the Application Footer.

Definition

function after_ui_footer($event, $arguments){}

Arguments

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

Considerations

  • The after_ui_footer hook is only applicable for modules in backward compatibility mode.
  • This is a global logic hook where the logic hook reference must be placed in ./custom/modules/logic_hooks.php.
  • If you intend to write display logic to the screen in a module running in backward compatibility, you must first wrap the display logic in an IF condition to prevent the text breaking the Ajax page loads. This logic may vary and it is best to only run your code on specific pages rather than all pages.
    if (!isset($_REQUEST["to_pdf"]) || $_REQUEST["to_pdf"] == false)
    {
        //display logic
    }
  • This hook is executed on all page loads.
  • Application hooks do not make use of the $bean argument.

Change Log

Version Note
7.10.0.0 Deprecated after_ui_footer hook
5.0.0a Added after_ui_footer hook

Example

./custom/modules/logic_hooks.php

<?php

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

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

        //Label. A string value to identify the hook.
        'after_ui_footer 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_footer_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_footer_method($event, $arguments)
        {
            //display logic should check for $_REQUEST["to_pdf"]
        }
    }

?>