You are a developer and looking for Shopware projects?
Apply Now!
disableForNextFlush example
else
{
$path
= '|' .
$path
. '|';
}
$item
->
internalSetPath
(
$path
)
;
$batchModeEnabled
=
Shopware
(
)
->
Config
(
)
->
get
(
'moveBatchModeEnabled'
)
;
if
(
$item
->
isLeaf
(
)
|| !
$batchModeEnabled
)
{
$needsRebuild
= false;
}
else
{
Shopware
(
)
->
Container
(
)
->
get
(
Shopware\Components\Model\CategorySubscriber::
class
)
->
disableForNextFlush
(
)
;
$needsRebuild
= true;
}
$this
->em->
flush
(
$item
)
;
}
$this
->
View
(
)
->
assign
(
[
'success' => true,
'needsRebuild' =>
$needsRebuild
,
]
)
;
}