TreeUpdaterBag example

/** * @param array<string> $updateIds */
    public function batchUpdate(array $updateIds, string $entity, Context $context): void
    {
        $updateIds = Uuid::fromHexToBytesList(array_unique($updateIds));
        if (empty($updateIds)) {
            return;
        }

        $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);
            }

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