before_email_import
Overview
The before_email_import
hook executes before a SNIP email has been imported.
Definition
function before_email_import($bean, $event, $arguments){}
Arguments
Name | Type | Description |
---|---|---|
bean | Object | The Email object |
event | String | The current event |
arguments | Array | Additional information related to the event (typically empty) |
Considerations
- This is a global logic hook where the logic hook reference must be placed in
./custom/modules/logic_hooks.php
.
Change Log
Version | Note |
---|---|
6.5.0RC1 | Added before_email_import hook |
Example
./custom/modules/logic_hooks.php
<?php
$hook_version = 1;
$hook_array = Array();
$hook_array['before_email_import'] = Array();
$hook_array['before_email_import'][] = Array(
//Processing index. For sorting the array.
1,
//Label. A string value to identify the hook.
'before_email_import example',
//The PHP file where your class is located.
'custom/modules/SNIP/logic_hooks_class.php',
//The class the method is in.
'logic_hooks_class',
//The method to call.
'before_email_import_method'
);
?>
./custom/modules/SNIP/logic_hooks_class.php
<?php
if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
class logic_hooks_class
{
function before_email_import_method($bean, $event, $arguments)
{
//logic
}
}
?>