Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setVariables example
$file
=
new
SplFileObject
(
$file
, 'w'
)
;
if
(
!
$file
->
flock
(
LOCK_EX | LOCK_NB
)
)
{
return
;
}
$this
->compiler->
setConfiguration
(
$this
->
getCompilerConfiguration
(
$shop
)
)
;
$config
=
$this
->
getConfig
(
$template
,
$shop
)
;
$this
->compiler->
setVariables
(
$config
)
;
$definitions
=
$this
->lessCollector->
collectLessDefinitions
(
$template
,
$shop
)
;
foreach
(
$definitions
as
$definition
)
{
$this
->
compileLessDefinition
(
$shop
,
$definition
)
;
}
$css
=
$this
->compiler->
get
(
)
;
$this
->compiler->
reset
(
)
;
$success
=
$file
->
fwrite
(
$css
)
;
if
(
$success
=== null
)
{