Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
TwigExtensionPass example
$container
->
addCompilerPass
(
new
CorsCompilerPass
(
)
)
;
$container
->
addCompilerPass
(
new
StackedKernelPass
(
)
)
;
$container
->
addCompilerPass
(
new
StackedSessionHandlerPass
(
)
)
;
$container
->
addCompilerPass
(
new
MainContentRenderersPass
(
)
)
;
// Collect tagged handler services as method calls on consumer services.
$container
->
addCompilerPass
(
new
TaggedHandlersPass
(
)
)
;
$container
->
addCompilerPass
(
new
RegisterStreamWrappersPass
(
)
)
;
$container
->
addCompilerPass
(
new
TwigExtensionPass
(
)
)
;
// Add a compiler pass for registering event subscribers.
$container
->
addCompilerPass
(
new
RegisterEventSubscribersPass
(
)
, PassConfig::TYPE_AFTER_REMOVING
)
;
$container
->
addCompilerPass
(
new
RegisterAccessChecksPass
(
)
)
;
// Add a compiler pass for registering services needing destruction.
$container
->
addCompilerPass
(
new
RegisterServicesForDestructionPass
(
)
)
;
// Add the compiler pass that will process the tagged services.
$container
->
addCompilerPass
(
new
ListCacheBinsPass
(
)
)
;