getMergeableTranslationPayload example

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;
        }

        return new EntityWriteResult(
            $writeResult->getPrimaryKey(),
            $payload,
            $writeResult->getEntityName(),
            $writeResult->getOperation(),
            
Home | Imprint | This part of the site doesn't use cookies.