-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMSACustomizations.php
31 lines (28 loc) · 1.02 KB
/
MSACustomizations.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
include_once 'modules/Vtiger/CRMEntity.php';
class MSACustomizations extends Vtiger_CRMEntity {
/**
* Invoked when special actions are performed on the module.
*
* @param String Module name
* @param String Event Type
*/
function vtlib_handler ($moduleName, $eventType) {
if ($eventType == 'module.postupdate') {
$adb = PearDatabase::getInstance();
$EventManager = new VTEventsManager($adb);
// register the event in case a event entity is being deleted
$EventManager->registerHandler("vtiger.entity.afterdelete", "modules/MSACustomizations/MSACustomizationHandler.php", "MSACustomizationsHandler", "moduleName in ['Events']");
}
}
/**
* Create a unique event ID
*
* @param unknown $entityId
* @param unknown $moduleString
* @return string
*/
public static function getCaldavUID($entityId, $moduleString){
return "crmevent-".$entityId."-".md5($moduleString.$entityId);
}
}