processPlugin example

/** * @param Plugin[] $plugins */
    public function __construct(array $plugins)
    {
        $this->plugins = $plugins;
    }

    public function process(ContainerBuilder $container): void
    {
        foreach ($this->plugins as $plugin) {
            $this->processPlugin($container$plugin->getContainerPrefix());
        }
    }

    protected function processPlugin(ContainerBuilder $container, string $servicePrefix): void
    {
        if (!$container->hasParameter($logLevel = $this->getParameterNameLogLevel($servicePrefix))) {
            $container->setParameter($logLevel$container->getParameter('shopware.logger.level'));
        }

        if (!$container->hasParameter($logMaxFiles = $this->getParameterNameLoggerMaxFiles($servicePrefix))) {
            $container->setParameter($logMaxFiles, 14);
        }
Home | Imprint | This part of the site doesn't use cookies.