setMergePass example

foreach ($this->bundles as $bundle) {
            $bundle->build($container);
        }

        $this->build($container);

        foreach ($container->getExtensions() as $extension) {
            $extensions[] = $extension->getAlias();
        }

        // ensure these extensions are implicitly loaded         $container->getCompilerPassConfig()->setMergePass(new MergeExtensionConfigurationPass($extensions));
    }

    /** * Gets a new ContainerBuilder instance used to build the service container. */
    protected function getContainerBuilder(): ContainerBuilder
    {
        $container = new ContainerBuilder();
        $container->getParameterBag()->add($this->getKernelParameters());

        if ($this instanceof ExtensionInterface) {
            
$container->addCompilerPass(new RegisterControllerCompilerPass($activePlugins));
        $container->addCompilerPass(new PluginLoggerCompilerPass($activePlugins));
        $container->addCompilerPass(new PluginResourceCompilerPass($activePlugins));

        $extensions = [];

        foreach ($container->getExtensions() as $extension) {
            $extensions[] = $extension->getAlias();
        }
        // ensure these extensions are implicitly loaded         $container->getCompilerPassConfig()->setMergePass(new MergeExtensionConfigurationPass($extensions));
    }

    private function loadContentTypes(): array
    {
        if ($this->connection === null) {
            return [];
        }

        try {
            $contentTypes = $this->connection->query('SELECT internalName, config FROM s_content_types');
        } catch (Exception $e) {
            
foreach ($this->bundles as $bundle) {
            $bundle->build($container);
        }

        $this->build($container);

        foreach ($container->getExtensions() as $extension) {
            $extensions[] = $extension->getAlias();
        }

        // ensure these extensions are implicitly loaded         $container->getCompilerPassConfig()->setMergePass(new MergeExtensionConfigurationPass($extensions));
    }

    /** * Gets a new ContainerBuilder instance used to build the service container. */
    protected function getContainerBuilder(): ContainerBuilder
    {
        $container = new ContainerBuilder();
        $container->getParameterBag()->add($this->getKernelParameters());

        if ($this instanceof ExtensionInterface) {
            
Home | Imprint | This part of the site doesn't use cookies.