Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
PluginResourceCompilerPass example
$container
->
addObjectResource
(
$bundle
)
;
$bundle
->
build
(
$container
)
;
if
(
$bundle
instanceof Plugin
)
{
$activePlugins
[
]
=
$bundle
;
}
}
$container
->
addCompilerPass
(
new
RegisterControllerCompilerPass
(
$activePlugins
)
)
;
$container
->
addCompilerPass
(
new
PluginLoggerCompilerPass
(
$activePlugins
)
)
;
$container
->
addCompilerPass
(
new
PluginResourceCompilerPass
(
$activePlugins
)
)
;
$extensions
=
[
]
;
foreach
(
$container
->
getExtensions
(
)
as
$extension
)
{
$extensions
[
]
=
$extension
->
getAlias
(
)
;
}
// ensure these extensions are implicitly loaded
$container
->
getCompilerPassConfig
(
)
->
setMergePass
(
new
MergeExtensionConfigurationPass
(
$extensions
)
)
;
}
private
function
loadContentTypes
(
)
: array
{