|
11 | 11 | use Neos\Flow\Annotations as Flow; |
12 | 12 | use Sitegeist\LostInTranslation\Domain\Model\Glossary; |
13 | 13 | use Sitegeist\LostInTranslation\Domain\Model\GlossaryEntry; |
| 14 | +use Sitegeist\LostInTranslation\Domain\Repository\GlossaryEntryRepository; |
14 | 15 | use Sitegeist\LostInTranslation\Domain\Repository\GlossaryRepository; |
15 | 16 | use Sitegeist\LostInTranslation\Infrastructure\DeepL\DeepLCacheService; |
16 | 17 | use Sitegeist\LostInTranslation\Infrastructure\DeepL\DeepLCustomAuthenticationKeyService; |
@@ -43,6 +44,12 @@ class LostInTranslationModuleController extends AbstractModuleController |
43 | 44 | */ |
44 | 45 | protected $glossaryRepository; |
45 | 46 |
|
| 47 | + /** |
| 48 | + * @var GlossaryEntryRepository |
| 49 | + * @Flow\Inject |
| 50 | + */ |
| 51 | + protected $glossaryEntryRepository; |
| 52 | + |
46 | 53 | /** |
47 | 54 | * @Flow\Inject |
48 | 55 | * @var DeepLCustomAuthenticationKeyService |
@@ -211,10 +218,15 @@ public function editGlossaryEntryAction(GlossaryEntry $entry): void |
211 | 218 |
|
212 | 219 | public function updateGlossaryEntryAction(GlossaryEntry $entry, string $sourceText, string $targetText): void |
213 | 220 | { |
| 221 | + |
214 | 222 | $entry->sourceText = $sourceText; |
215 | 223 | $entry->targetText = $targetText; |
216 | | - $entry->glossary->updateModificationDate(); |
| 224 | + $this->glossaryEntryRepository->update($entry); |
| 225 | + |
| 226 | + $glossary = $entry->glossary; |
| 227 | + $glossary->updateModificationDate(); |
217 | 228 | $this->glossaryRepository->update($entry->glossary); |
| 229 | + |
218 | 230 | $this->forward(actionName: 'showGlossary', arguments: ['glossary' => $entry->glossary]); |
219 | 231 | } |
220 | 232 |
|
|
0 commit comments