Skip to content

Commit

Permalink
Merge branch '6.4' into 6.x
Browse files Browse the repository at this point in the history
* 6.4:
  Fixed MessageCatalogue strict type parameters in Translator Loader
  [AdminBundle] fixed base route name for exception admin lists
  Fix node reorder parents
acrobat committed Apr 28, 2024
2 parents b28ea31 + e90e1f9 commit 8b7ef10
Showing 3 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -121,4 +121,18 @@ public function getEntityClass(): string
{
return Exception::class;
}

/**
* @param string|null $suffix
*
* @return string
*/
public function getPathByConvention($suffix = null)
{
if (null === $suffix || $suffix === '') {
return 'kunstmaanadminbundle_admin_exception';
}

return sprintf('kunstmaanadminbundle_admin_exception_%s', $suffix);
}
}
Original file line number Diff line number Diff line change
@@ -644,7 +644,7 @@ public function reorderAction(Request $request): Response
$this->init($request);
$nodes = [];
$nodeIds = $request->request->all('nodes');
$changeParents = $request->request->get('parent');
$changeParents = $request->request->all('parent');

foreach ($nodeIds as $id) {
/* @var Node $node */
6 changes: 5 additions & 1 deletion src/Kunstmaan/TranslatorBundle/Service/Translator/Loader.php
Original file line number Diff line number Diff line change
@@ -24,7 +24,11 @@ public function load($resource, $locale, $domain = 'messages')
$catalogue = new MessageCatalogue($locale);
$translations = $this->translationRepository->findBy(['locale' => $locale]);
foreach ($translations as $translation) {
$catalogue->set($translation->getKeyword(), $translation->getText(), $translation->getDomain());
$catalogue->set(
(string) $translation->getKeyword(),
(string) $translation->getText(),
(string) $translation->getDomain()
);
}
$this->catalogues[$locale] = $catalogue;
} else {

0 comments on commit 8b7ef10

Please sign in to comment.