/** * Add a delete entry to the audit log * * @param WebhookEvent $event */ public function onWebhookDelete(WebhookEvent $event) { $webhook = $event->getWebhook(); $log = array("bundle" => "webhook", "object" => "webhook", "objectId" => $event->getWebhook()->deletedId, "action" => "delete", "details" => array('name' => $webhook->getName()), "ipAddress" => $this->factory->getIpAddressFromRequest()); $this->factory->getModel('core.auditLog')->writeToLog($log); }
/** * Add a delete entry to the audit log. * * @param WebhookEvent $event */ public function onWebhookDelete(WebhookEvent $event) { $webhook = $event->getWebhook(); $log = ['bundle' => 'webhook', 'object' => 'webhook', 'objectId' => $event->getWebhook()->deletedId, 'action' => 'delete', 'details' => ['name' => $webhook->getName()], 'ipAddress' => $this->ipLookupHelper->getIpAddressFromRequest()]; $this->auditLogModel->writeToLog($log); }