singleUpdate example



        $bag = new TreeUpdaterBag();

        $this->updateEntityStatement = null;

        $definition = $this->registry->getByEntityName($entity);

        // the batch update does not support versioning, so fallback to single updates         if ($definition->isVersionAware() && $context->getVersionId() !== Defaults::LIVE_VERSION) {
            foreach ($updateIds as $id) {
                $this->singleUpdate(Uuid::fromBytesToHex($id)$entity$context);
            }

            return;
        }

        // 1. fetch parents until all ids have reached parent_id === null         $this->loadAllParents($updateIds$definition$context$bag);

        // 2. set path and level         $this->updateLevelRecursively($updateIds$definition$context$bag);
    }

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