Skip to content
Snippets Groups Projects
Commit 2c14ef5b authored by jaapjansma's avatar jaapjansma
Browse files

also added other events

parent af95f0c2
No related branches found
No related tags found
No related merge requests found
......@@ -31,18 +31,20 @@ class CRM_Civirules_Event_EditEntity {
$entity = self::convertObjectNameToEntity($objectName);
if ($op == 'edit') {
//set data
$data = array();
//set data
$data = array();
if (is_object($objectRef)) {
CRM_Core_DAO::storeValues($objectRef, $data);
} elseif (is_array($objectRef)) {
$data = $objectRef;
}
if ($op == 'edit') {
//set also original data with an edit event
$oldData = self::getPreData($entity, $objectId);
$eventData = new CRM_Civirules_EventData_Edit($entity, $objectId, $data, $oldData);
} else {
//set data
$data = array();
CRM_Core_DAO::storeValues($objectRef, $data);
$eventData = new CRM_Civirules_EventData_EventData_Post($entity, $objectId, $data);
$eventData = new CRM_Civirules_EventData_Post($entity, $objectId, $data);
}
//find matching rules for this objectName and op
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment