Пример #1
0
 /**
  * Add an entry to the audit log
  *
  * @param Events\StageEvent $event
  */
 public function onStagePostSave(Events\StageEvent $event)
 {
     $stage = $event->getStage();
     if ($details = $event->getChanges()) {
         $log = array("bundle" => "stage", "object" => "stage", "objectId" => $stage->getId(), "action" => $event->isNew() ? "create" : "update", "details" => $details, "ipAddress" => $this->factory->getIpAddressFromRequest());
         $this->factory->getModel('core.auditLog')->writeToLog($log);
     }
 }
Пример #2
0
 /**
  * Add an entry to the audit log.
  *
  * @param Events\StageEvent $event
  */
 public function onStagePostSave(Events\StageEvent $event)
 {
     $stage = $event->getStage();
     if ($details = $event->getChanges()) {
         $log = ['bundle' => 'stage', 'object' => 'stage', 'objectId' => $stage->getId(), 'action' => $event->isNew() ? 'create' : 'update', 'details' => $details, 'ipAddress' => $this->ipLookupHelper->getIpAddressFromRequest()];
         $this->auditLogModel->writeToLog($log);
     }
 }