Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
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
;
}
}