getActivePlugins example


    private function synchronizePluginThemes()
    {
        $plugins = $this->util->getActivePlugins();

        $themes = [];

        /** @var Plugin $plugin */
        foreach ($plugins as $plugin) {
            $path = $this->pathResolver->getPluginPath($plugin);

            // Check if plugin contains themes             if (!file_exists($path . DIRECTORY_SEPARATOR . 'Themes')) {
                continue;
            }

            
'ShopwarePlugins' => $this->config['plugin_directories']['ShopwarePlugins'],
                'ProjectPlugins' => $this->config['plugin_directories']['ProjectPlugins'],
            ]
        );

        $plugins = $initializer->initializePlugins();

        ksort($plugins);

        $this->bundles = array_merge($this->bundles, $plugins);

        $this->activePlugins = $initializer->getActivePlugins();

        $this->pluginHash = $this->createPluginHash($this->bundles);
    }

    /** * Loads the shopware configuration, which will be injected into * the Shopware_Application. * The shopware configuration is required before the shopware application booted, * to pass the configuration to the Symfony di container. * * @throws Exception */

        $this->projectDir = $projectDir;
    }

    public function getConfig(): array
    {
        return array_merge($this->generatePluginConfigs()$this->generateAppConfigs());
    }

    private function generatePluginConfigs(): array
    {
        $activePlugins = $this->getActivePlugins();

        $kernelBundles = $this->kernel->getBundles();

        $bundles = [];
        foreach ($kernelBundles as $bundle) {
            // only include shopware bundles             if (!$bundle instanceof Bundle) {
                continue;
            }

            // dont include deactivated plugins
Home | Imprint | This part of the site doesn't use cookies.