Feature: Creating Privacy Basics

This commit is contained in:
2026-08-24 21:06:11 +03:00
parent e31de1b4e3
commit 9f540cbaa4
38 changed files with 1969 additions and 3 deletions
@@ -0,0 +1,20 @@
<?php
namespace Modules\Core\Privacy\Events;
use Modules\Core\Privacy\Models\DataExportRequest;
/**
* Fired once the export file exists and $request has been marked completed. Core
* has no opinion on how the customer should be told — a consuming app registers
* its own notification against this event via Modules\Core\Notification\
* NotificationRegistry, the same pattern as App\Notifications\
* QuestionnaireResultsSentNotification listening on App\Events\
* QuestionnaireResultsSent.
*/
class PersonalDataExportFileWritten
{
public function __construct(
public readonly DataExportRequest $request,
) {}
}
@@ -0,0 +1,22 @@
<?php
namespace Modules\Core\Privacy\Events;
use Modules\Core\Privacy\ExportReport;
use Modules\Core\Privacy\Models\DataExportRequest;
/**
* Fired once ExportDataSubjectJob has gathered every registered provider's data —
* no file exists yet at this point. Modules\Core\Privacy\Listeners\
* WriteExportToCsvListener (registered in PrivacyServiceProvider) is what actually
* turns this into a file, kept as its own listener rather than inline in the job
* so the export *format* (CSV today) is swappable without touching how the data
* is gathered.
*/
class PersonalDataGathered
{
public function __construct(
public readonly DataExportRequest $request,
public readonly ExportReport $report,
) {}
}