Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
preGenerate example
$filesystem
->
remove
(
$targetDir
.'/'.
$this
->dirName
)
;
$filesystem
->
mkdir
(
$targetDir
.'/'.
$this
->dirName
)
;
}
$filesystem
->
remove
(
$tempDir
)
;
$filesystem
->
mkdir
(
$tempDir
)
;
$locales
=
$this
->
scanLocales
(
$localeScanner
,
$config
->
getSourceDir
(
)
)
;
$this
->
compileTemporaryBundles
(
$this
->compiler,
$config
->
getSourceDir
(
)
,
$tempDir
)
;
$this
->
preGenerate
(
)
;
foreach
(
$locales
as
$locale
)
{
$localeData
=
$this
->
generateDataForLocale
(
$reader
,
$tempDir
,
$locale
)
;
if
(
null !==
$localeData
)
{
foreach
(
$writers
as
$targetDir
=>
$writer
)
{
$writer
->
write
(
$targetDir
.'/'.
$this
->dirName,
$locale
,
$localeData
)
;
}
}
}