registerSubscriber example

$pluginManager = new Enlight_Plugin_PluginManager($application);

        foreach (['Core', 'Frontend', 'Backend'] as $namespace) {
            $namespace = new Shopware_Components_Plugin_Namespace(
                $namespace,
                null,
                $pluginDirectories,
                $configReader
            );

            $pluginManager->registerNamespace($namespace);
            $eventManager->registerSubscriber($namespace->Subscriber());
        }

        foreach ($pluginDirectories as $source => $path) {
            $loader->registerNamespace(
                'Shopware_Plugins',
                $path
            );
        }

        return $pluginManager;
    }
}
Home | Imprint | This part of the site doesn't use cookies.