AdditionalBundleParameters example


    final public function getBundles(array $kernelParameters = [], array $loadedBundles = []): iterable
    {
        if (!$this->initialized) {
            return;
        }

        foreach ($this->pluginInstances->getActives() as $plugin) {
            $copy = new KernelPluginCollection($this->getPluginInstances()->all());
            $additionalBundleParameters = new AdditionalBundleParameters($this->classLoader, $copy$kernelParameters);
            $additionalBundles = $plugin->getAdditionalBundles($additionalBundleParameters);
            [$preLoaded$postLoaded] = $this->splitBundlesIntoPreAndPost($additionalBundles);

            foreach ([...\array_values($preLoaded)$plugin, ...\array_values($postLoaded)] as $bundle) {
                if (!\in_array($bundle->getName()$loadedBundles, true)) {
                    yield $bundle;
                    $loadedBundles[] = $bundle->getName();
                }
            }
        }

        
throw new PluginNotFoundException($bundleName);
        }

        return $bundle;
    }

    /** * @return array<BundleInterface> */
    private function getAdditionalBundles(Plugin $bundle): array
    {
        $params = new AdditionalBundleParameters(
            $this->pluginLoader->getClassLoader(),
            $this->pluginLoader->getPluginInstances(),
            $this->parameterBag->all()
        );

        return $bundle->getAdditionalBundles($params);
    }

    /** * @return array<string, array<string, string>> */
    
Home | Imprint | This part of the site doesn't use cookies.