/**
  * Add a note entry to the audit log
  *
  * @param Events\LeadNoteEvent $event
  */
 public function onNotePostSave(Events\LeadNoteEvent $event)
 {
     $note = $event->getNote();
     if ($details = $event->getChanges()) {
         $log = array("bundle" => "lead", "object" => "note", "objectId" => $note->getId(), "action" => $event->isNew() ? "create" : "update", "details" => $details, "ipAddress" => $this->factory->getIpAddressFromRequest());
         $this->factory->getModel('core.auditLog')->writeToLog($log);
     }
 }
Beispiel #2
0
 /**
  * Add a note entry to the audit log.
  *
  * @param Events\LeadNoteEvent $event
  */
 public function onNotePostSave(Events\LeadNoteEvent $event)
 {
     $note = $event->getNote();
     if ($details = $event->getChanges()) {
         $log = ['bundle' => 'lead', 'object' => 'note', 'objectId' => $note->getId(), 'action' => $event->isNew() ? 'create' : 'update', 'details' => $details, 'ipAddress' => $this->ipLookupHelper->getIpAddressFromRequest()];
         $this->auditLogModel->writeToLog($log);
     }
 }