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,
        ]);
    }

    
Home | Imprint | This part of the site doesn't use cookies.