Skip to content

Commit

Permalink
Merge pull request #157 from maximehuran/feature/correct-default-sett…
Browse files Browse the repository at this point in the history
…ings

Correct default settings valus when many documentable entities
  • Loading branch information
maximehuran authored Jun 30, 2023
2 parents e980580 + 5c62fd9 commit 56d4cee
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/DependencyInjection/DocumentableRegistryPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,8 @@ public function process(ContainerBuilder $container): void
$registry->addMethodCall('register', [$documentableServiceId, new Reference($documentableServiceId)]);

// Add the default settings value of documentable
$searchSettings['monsieurbiz.search']['default_values'] = [
'instant_search_enabled__' . $indexCode => $documentableConfiguration['instant_search_enabled'],
'limits__' . $indexCode => $documentableConfiguration['limits'],
];
$searchSettings['monsieurbiz.search']['default_values']['instant_search_enabled__' . $indexCode] = $documentableConfiguration['instant_search_enabled'];
$searchSettings['monsieurbiz.search']['default_values']['limits__' . $indexCode] = $documentableConfiguration['limits'];
}

$container->setParameter('monsieurbiz.settings.config.plugins', $searchSettings);
Expand Down

0 comments on commit 56d4cee

Please sign in to comment.