Explictly declare field callbacks for non migrated localized fields in pumps

This commit is contained in:
2025-09-17 00:17:30 +02:00
parent c6c2075c89
commit 38925e2f97
3 changed files with 4 additions and 1 deletions
+1
View File
@@ -77,6 +77,7 @@ class ProjectsBudgetPump implements PumpInterface
$this->setPreventFlushAndClear(false);
$this->localize($budgetItem, $localizations, $context, [
'title' => fn($l) => $l['cost'],
'description' => fn($l) => $l['description']
]);
}
+1
View File
@@ -101,6 +101,7 @@ class ProjectsPump implements PumpInterface
$this->setPreventFlushAndClear(false);
$this->localize($project, $localizations, $context, [
'title' => fn($l) => $l['name'],
'subtitle' => fn($l) => $l['subtitle'],
'description' => fn($l) => $this->getProjectDescription($l),
]);
}
+2 -1
View File
@@ -67,10 +67,10 @@ class ProjectsRewardsPump implements PumpInterface
}
$reward = new Reward();
$reward->addLocale($project->getLocales()[0]);
$reward->setProject($project);
$reward->setMigrated(true);
$reward->setMigratedId($record['id']);
$reward->setTranslatableLocale($project->getLocales()[0]);
$reward->setTitle($record['reward']);
$reward->setDescription($record['description'] ?? $record['reward']);
$reward->setMoney(new EmbeddableMoney($record['amount'] * 100, 'EUR'));
@@ -85,6 +85,7 @@ class ProjectsRewardsPump implements PumpInterface
$this->setPreventFlushAndClear(false);
$this->localize($reward, $localizations, $context, [
'title' => fn($l) => $l['reward'],
'description' => fn($l) => $l['description']
]);
}