Exemple #1
0
 /**
  * Add an entry to the audit log
  *
  * @param Events\TriggerEvent $event
  */
 public function onTriggerPostSave(Events\TriggerEvent $event)
 {
     $trigger = $event->getTrigger();
     if ($details = $event->getChanges()) {
         $log = array("bundle" => "point", "object" => "trigger", "objectId" => $trigger->getId(), "action" => $event->isNew() ? "create" : "update", "details" => $details, "ipAddress" => $this->factory->getIpAddressFromRequest());
         $this->factory->getModel('core.auditLog')->writeToLog($log);
     }
 }
 /**
  * Add an entry to the audit log.
  *
  * @param Events\TriggerEvent $event
  */
 public function onTriggerPostSave(Events\TriggerEvent $event)
 {
     $trigger = $event->getTrigger();
     if ($details = $event->getChanges()) {
         $log = ['bundle' => 'point', 'object' => 'trigger', 'objectId' => $trigger->getId(), 'action' => $event->isNew() ? 'create' : 'update', 'details' => $details, 'ipAddress' => $this->ipLookupHelper->getIpAddressFromRequest()];
         $this->auditLogModel->writeToLog($log);
     }
 }