obsoleteIds example

$insert['route_name'] = $routeName;
            $insert['is_canonical'] = ($seoUrl['isCanonical'] ?? true) ? 1 : null;
            $insert['is_modified'] = ($seoUrl['isModified'] ?? false) ? 1 : 0;
            $insert['is_deleted'] = ($seoUrl['isDeleted'] ?? true) ? 1 : 0;

            $insert['created_at'] = $dateTime;

            $insertQuery->addInsert($this->seoUrlRepository->getDefinition()->getEntityName()$insert);
        }

        RetryableTransaction::retryable($this->connection, function D) use ($obsoleted$insertQuery$foreignKeys$updatedFks$salesChannelId): void {
            $this->obsoleteIds($obsoleted$salesChannelId);
            $insertQuery->execute();

            $deletedIds = array_diff($foreignKeys$updatedFks);
            $notDeletedIds = array_unique(array_intersect($foreignKeys$updatedFks));

            $this->markAsDeleted(true, $deletedIds$salesChannelId);
            $this->markAsDeleted(false, $notDeletedIds$salesChannelId);
        });

        $this->eventDispatcher->dispatch(new SeoUrlUpdateEvent($updates));
    }

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