Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setForce example
return
;
}
$localeRepository
=
$this
->em->
getRepository
(
'Shopware\Models\Shop\Locale'
)
;
$inputAdapter
=
new
Enlight_Config_Adapter_File
(
[
'configDir' =>
$snippetsDir
,
]
)
;
$databaseWriter
=
new
DatabaseWriter
(
$this
->em->
getConnection
(
)
)
;
$databaseWriter
->
setForce
(
$force
)
;
$finder
=
new
Finder
(
)
;
$finder
->
files
(
)
->
in
(
$snippetsDir
)
;
$defaultLocale
=
$localeRepository
->
findOneBy
(
[
'locale' => 'en_GB'
]
)
;
$snippetCount
=
$this
->em->
getConnection
(
)
->
fetchArray
(
'SELECT * FROM s_core_snippets LIMIT 1'
)
;
$databaseWriter
->
setUpdate
(
(bool)
$snippetCount
)
;
foreach
(
$finder
as
$file
)
{
$filePath
=
$file
->
getRelativePathname
(
)
;
if
(
strpos
(
$filePath
, '.ini'
)
== \
strlen
(
$filePath
)
- 4
)
{