src/PHPDish/Bundle/ThemeBundle/DependencyInjection/PHPDishThemeExtension.php
public function load(array $configs, ContainerBuilder $container)
    {
        $configuration = new Configuration();
        $config = $this->processConfiguration($configuration, $configs);

        //polyfill to parameters
        $container->setParameter('phpdish_theme.theme_dir', $config['theme_directory']);

        $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
        $loader->load('theme.yml');
        $loader->load('templating.yml');

        //替换当前主题为
        if ($config['current_theme']) {
            $container->findDefinition('phpdish_theme.theme_context')->replaceArgument(0, $config['current_theme']);
        }

        //Theme finder
        $container->findDefinition('phpdish_theme.theme_finder')
            ->replaceArgument(0, $config['configuration_filename'])
            ->replaceArgument(1, $config['configuration_type'])
            ->replaceArgument(2, $config['theme_directory']);

        //Theme manager
        $container->findDefinition('phpdish_theme.theme_manager')
            ->replaceArgument(2, $config['namespaces']);
    }
public function load(array $configs, ContainerBuilder $container)
    {
        $configuration = new Configuration();
        $config = $this->processConfiguration($configuration, $configs);

        //polyfill to parameters
        $container->setParameter('phpdish_theme.theme_dir', $config['theme_directory']);

        $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
        $loader->load('theme.yml');
        $loader->load('templating.yml');

        //替换当前主题为
        if ($config['current_theme']) {
            $container->findDefinition('phpdish_theme.theme_context')->replaceArgument(0, $config['current_theme']);
        }

        //Theme finder
        $container->findDefinition('phpdish_theme.theme_finder')
            ->replaceArgument(0, $config['configuration_filename'])
            ->replaceArgument(1, $config['configuration_type'])
            ->replaceArgument(2, $config['theme_directory']);

        //Theme manager
        $container->findDefinition('phpdish_theme.theme_manager')
            ->replaceArgument(2, $config['namespaces']);
    }
{@inheritdoc}