findWriteResultByPrimaryKey example

$writtenEvent->getEntityName(),
            $mergedWriteResults,
            $writtenEvent->getContext(),
            $writtenEvent->getErrors()
        );
    }

    private function getMergedWriteResult(
        EntityWrittenEvent $translationEvent,
        EntityWriteResult $writeResult
    ): ?EntityWriteResult {
        $translationResults = $this->findWriteResultByPrimaryKey(
            $translationEvent->getWriteResults(),
            $writeResult->getPrimaryKey()
        );

        $payload = $writeResult->getPayload();
        foreach ($translationResults as $translationResult) {
            $payload = array_merge($payload$this->getMergeableTranslationPayload($translationResult));
        }

        if (empty($payload)) {
            return null;
        }
Home | Imprint | This part of the site doesn't use cookies.