/**
* @param list<array<string, mixed>> $payload
*/
private function write(array
$payload, Context
$context): void
{ $context->
addState(EntityIndexerRegistry::DISABLE_INDEXING
);
$this->registry->
getRepository('promotion'
)->
create($payload,
$context);
$context->
removeState(EntityIndexerRegistry::DISABLE_INDEXING
);
} /**
* @param list<array<string, string|int>> $salesChannels
*
* @return array<string, mixed>
*/
private function createPromotion(array
$salesChannels): array
{ return [ 'id' => Uuid::
randomHex(),