getResolvedConfiguration example

$service = new ConfigurationService(
            [
                new SwagExampleTest(true, ''),
            ],
            $configReader,
            $this->createMock(AppLoader::class),
            new StaticEntityRepository([new AppCollection()]),
            new StaticSystemConfigService(['SwagExampleTest.email' => 'foo'])
        );

        $actualConfig = $service->getResolvedConfiguration('SwagExampleTest', Context::createDefaultContext());

        static::assertCount(2, $actualConfig);
        static::assertCount(1, $actualConfig[0]['elements']);
        static::assertSame('SwagExampleTest.email', $actualConfig[0]['elements'][0]['name']);
        static::assertSame('foo', $actualConfig[0]['elements'][0]['value']);
    }

    /** * @param array<mixed> $config * * @return array<mixed> */

        $allConfigs = [];

        if ($this->storefrontPluginRegistry->getConfigurations()->count() === 0) {
            return;
        }

        try {
            foreach ($this->storefrontPluginRegistry->getConfigurations() as $configuration) {
                $allConfigs = array_merge(
                    $allConfigs,
                    $this->configurationService->getResolvedConfiguration(
                        $configuration->getTechnicalName() . '.config',
                        $event->getContext(),
                        $event->getSalesChannelId()
                    )
                );
            }
        } catch (DBALException $e) {
            if (\defined('\STDERR')) {
                fwrite(
                    \STDERR,
                    'Warning: Failed to load plugin css configuration. Ignoring plugin css customizations. Message: '
                    .
Home | Imprint | This part of the site doesn't use cookies.