Skip to content

Commit c959df3

Browse files
authored
Fix example for SiteConfigurationLoadedEvent (#5736)
1 parent fea3259 commit c959df3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Documentation/ApiOverview/Events/Events/Core/Configuration/_SiteConfigurationLoadedEvent/_ImportRoutesIntoSiteConfiguration.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,16 @@ public function __construct(
2323
public function __invoke(SiteConfigurationLoadedEvent $event): void
2424
{
2525
$routeConfiguration = $this->yamlFileLoader->load(self::ROUTES);
26+
$siteConfiguration = $event->getConfiguration();
2627

2728
// Using this method instead of array_merge_recursive will
2829
// prevent duplicate keys, and also allow to use the special
2930
// "_UNSET" handling properly.
30-
$configuration = ArrayUtility::mergeRecursiveWithOverrule(
31-
$event->getConfiguration(),
32-
$$routeConfiguration,
31+
ArrayUtility::mergeRecursiveWithOverrule(
32+
$siteConfiguration,
33+
$routeConfiguration,
3334
);
3435

35-
$event->setConfiguration($configuration);
36+
$event->setConfiguration($siteConfiguration);
3637
}
3738
}

0 commit comments

Comments
 (0)