Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
cleanupTemplateRelations example
if
(
$this
->request->
isPost
(
)
)
{
$this
->
cleanupMedia
(
)
;
}
if
(
\
count
(
$cleanupList
)
== 0
)
{
$_SESSION
[
'CLEANUP_DONE'
]
= true;
$this
->response->
redirect
(
$this
->app->
urlFor
(
'done'
)
)
;
}
if
(
$this
->request->
isPost
(
)
)
{
$this
->
cleanupTemplateRelations
(
)
;
$result
=
[
]
;
foreach
(
$cleanupList
as
$path
)
{
$result
=
array_merge
(
$result
, Utils::
cleanPath
(
$path
)
)
;
}
if
(
\
count
(
$result
)
== 0
)
{
$_SESSION
[
'CLEANUP_DONE'
]
= true;
$this
->response->
redirect
(
$this
->app->
urlFor
(
'done'
)
)
;
}
else
{
$result
=
array_map
(