PrimaryKeyBag example

$this->createMock(ValidatorInterface::class),
            $this->createMock(EntityWriteGatewayInterface::class)
        );

        $context = Context::createDefaultContext($scope);

        $parameters = new WriteParameterBag(
            $registry->get(WebhookDefinition::class),
            WriteContext::createFromContext($context),
            '',
            new WriteCommandQueue(),
            new PrimaryKeyBag()
        );

        $extractor->extract($data$parameters);

        if ($valid) {
            static::assertCount(0, $parameters->getContext()->getExceptions()->getExceptions());

            return;
        }

        static::assertCount(1, $parameters->getContext()->getExceptions()->getExceptions());
        
private ?string $currentWriteLanguageId = null;

    public function __construct(
        /** Defines the entity definition where the field placed in */
        private readonly EntityDefinition $definition,
        /** Contains the write context instance of the current write process */
        private readonly WriteContext $context,
        /** Contains the current property path for the proccessed field e.g product/{id}/name */
        private string $path,
        /** Contains all already applied write commands of the current write process */
        private readonly WriteCommandQueue $commandQueue,
        private PrimaryKeyBag $primaryKeyBag = new PrimaryKeyBag()
    ) {
    }

    public function getDefinition(): EntityDefinition
    {
        return $this->definition;
    }

    public function getContext(): WriteContext
    {
        return $this->context;
    }
Home | Imprint | This part of the site doesn't use cookies.