Skip to content

Commit

Permalink
Change event dispatching
Browse files Browse the repository at this point in the history
  • Loading branch information
back-2-95 committed Jan 17, 2022
1 parent e6f60b1 commit a8493da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Sql/GdprSqlBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public static function getInstance($db_spec, $options, EventDispatcherInterface
if (empty($options['extra-dump']) || strpos($options['extra-dump'], '--gdpr-expressions') === false) {
// Dispatch event so the expressions can be altered.
$event = new GdprExpressionsEvent($config->get('gdpr_expressions'));
$event_dispatcher->dispatch(GdprDumperEvents::GDPR_EXPRESSIONS, $event);
$event_dispatcher->dispatch($event, GdprDumperEvents::GDPR_EXPRESSIONS);
// Add the configured GDPR expressions to the command.
if ($expressions = Json::encode($event->getExpressions())){
$options['extra-dump'] .= " --gdpr-expressions='$expressions'";
Expand All @@ -74,7 +74,7 @@ public static function getInstance($db_spec, $options, EventDispatcherInterface
if (empty($options['extra-dump']) || strpos($options['extra-dump'], '--gdpr-replacements') === false) {
// Dispatch event so the replacements can be altered.
$event = new GdprReplacementsEvent($config->get('gdpr_replacements'));
$event_dispatcher->dispatch(GdprDumperEvents::GDPR_REPLACEMENTS, $event);
$event_dispatcher->dispatch($event, GdprDumperEvents::GDPR_REPLACEMENTS);
// Add the configured GDPR replacements to the command.
if ($replacements = Json::encode($event->getReplacements())){
$options['extra-dump'] .= " --gdpr-replacements='$replacements'";
Expand Down

0 comments on commit a8493da

Please sign in to comment.