DependencyInjection/HarmonyThemeExtension.php
public function load(array $configs, ContainerBuilder $container)
    {
        $loader = new Loader\YamlFileLoader($container, new FileLocator(dirname(__DIR__) . '/Resources/config'));
        $loader->load('services.yaml');

        $twigFilesystemLoaderDefinition = $container->getDefinition('twig.loader.filesystem');
        // register themes as Twig namespaces
        foreach ($container->getParameter('kernel.themes') as $namespace => $class) {
            /** @var ThemeInterface $themeClass */
            $themeClass = new $class();
            $twigFilesystemLoaderDefinition->addMethodCall('addPath', [$themeClass->getPath(), $namespace]);
        }
    }
public function load(array $configs, ContainerBuilder $container)
    {
        $loader = new Loader\YamlFileLoader($container, new FileLocator(dirname(__DIR__) . '/Resources/config'));
        $loader->load('services.yaml');

        $twigFilesystemLoaderDefinition = $container->getDefinition('twig.loader.filesystem');
        // register themes as Twig namespaces
        foreach ($container->getParameter('kernel.themes') as $namespace => $class) {
            /** @var ThemeInterface $themeClass */
            $themeClass = new $class();
            $twigFilesystemLoaderDefinition->addMethodCall('addPath', [$themeClass->getPath(), $namespace]);
        }
    }
Loads a specific configuration.

@param array            $configs   An array of configuration values
@param ContainerBuilder $container A ContainerBuilder instance

@throws InvalidArgumentException When provided tag is not defined in this extension
@throws Exception