fromBytesToHexList example



        $query->setParameter('type', CategoryDefinition::TYPE_LINK);

        $children = $query->executeQuery()->fetchFirstColumn();

        if (!$children) {
            return [];
        }

        /** @var list<string> $ids */
        $ids = Uuid::fromBytesToHexList($children);

        return $ids;
    }
}
if (!$definition) {
                continue;
            }

            $ruleIds = $this->hydrateRuleIds($this->getForeignKeyFields($definition)$nestedEvent$ruleIds);
        }

        if (empty($ruleIds)) {
            return;
        }

        $this->update(Uuid::fromBytesToHexList(array_unique(array_filter($ruleIds))));

        $this->cacheInvalidator->invalidate([CachedRuleLoader::CACHE_KEY]);
    }

    /** * @param list<string> $ids */
    public function update(array $ids): void
    {
        $associationFields = $this->getAssociationFields();

        
'documentName' => InvoiceRenderer::TYPE]
        );

        $euStates = $connection->fetchFirstColumn(
            'SELECT `id` FROM `country` WHERE `iso` IN (\'AT\', \'BE\', \'BG\', \'CY\', \'CZ\', \'DE\', \'DK\', \'EE\', \'GR\', \'ES\', \'FI\', \'FR\', \'GB\', \'HU\', \'IE\', \'IT\', \'LT\', \'LU\', \'LV\', \'MT\', \'NL\', \'PL\', \'PT\', \'RO\', \'SE\', \'SI\', \'SK\', \'HR\')'
        );

        foreach ($listInvoiceData as $invoiceData) {
            $invoiceConfig = json_decode($invoiceData['config'] ?? '[]', true, 512, \JSON_THROW_ON_ERROR);
            $invoiceConfig['deliveryCountries'] = Uuid::fromBytesToHexList($euStates);

            $connection->executeStatement(
                'UPDATE `document_base_config` SET `config` = :invoiceData WHERE `id` = :documentConfigId',
                [
                    'invoiceData' => json_encode($invoiceConfig, \JSON_THROW_ON_ERROR),
                    'documentConfigId' => $invoiceData['id'],
                ]
            );
        }
    }
}
if ($deLangId) {
                $this->updateMailTemplateTranslation(
                    $connection,
                    $templateId,
                    $deLangId,
                    $getHtmlTemplateDe,
                    $getPlainTemplateDe
                );
            }

            $ids = Uuid::fromBytesToHexList(
                array_filter([$deLangId$enLangId])
            );

            if (!\in_array(Defaults::LANGUAGE_SYSTEM, $ids, true)) {
                $this->updateMailTemplateTranslation(
                    $connection,
                    $templateId,
                    Uuid::fromHexToBytes(Defaults::LANGUAGE_SYSTEM),
                    $getHtmlTemplateEn,
                    $getPlainTemplateEn
                );
            }

            ['ids' => Uuid::fromHexToBytesList(array_values($event->getIds()))],
            ['ids' => ArrayParameterType::STRING]
        );

        if (empty($ruleIds)) {
            return;
        }

        $this->update(Uuid::fromBytesToHexList($ruleIds));
    }

    /** * @param array<string, mixed> $rules * * @return list<Rule> */
    private function buildNested(array $rules, ?string $parentId): array
    {
        $nested = [];
        foreach ($rules as $rule) {
            
array_keys($replacement),
            array_values($replacement),
            $sqlTemplate
        );

        $customerIds = RetryableQuery::retryable($this->connection, fn (): array => $this->connection->fetchFirstColumn($sql));

        if (empty($customerIds)) {
            return;
        }

        $this->update(Uuid::fromBytesToHexList($customerIds), true);
    }

    /** * @param array<string> $ids */
    public function updateCustomersRecipient(array $ids): void
    {
        $ids = array_unique($ids);

        $customers = $this->connection->fetchAllAssociative(
            'SELECT newsletter_sales_channel_ids, email, first_name, last_name FROM customer WHERE id IN (:ids)',
            [
Home | Imprint | This part of the site doesn't use cookies.