Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
DisableTemplateCachePass example
$loader
->
load
(
'seo.xml'
)
;
$loader
->
load
(
'controller.xml'
)
;
$loader
->
load
(
'theme.xml'
)
;
/** @var string $environment */
$environment
=
$container
->
getParameter
(
'kernel.environment'
)
;
$this
->
buildConfig
(
$container
,
$environment
)
;
$container
->
setParameter
(
'storefrontRoot',
$this
->
getPath
(
)
)
;
$container
->
addCompilerPass
(
new
DisableTemplateCachePass
(
)
)
;
$container
->
addCompilerPass
(
new
ReverseProxyCompilerPass
(
)
)
;
$container
->
addCompilerPass
(
new
StorefrontMigrationReplacementCompilerPass
(
)
)
;
}
private
function
buildConfig
(
ContainerBuilder
$container
, string
$environment
)
: void
{
$locator
=
new
FileLocator
(
'Resources/config'
)
;
$resolver
=
new
LoaderResolver
(
[
new
XmlFileLoader
(
$container
,
$locator
)
,
new
YamlFileLoader
(
$container
,
$locator
)
,