addTranslationToPayload example

case 'insert':
                    case 'update':
                        if ($definition instanceof EntityTranslationDefinition && $this->translationHasParent($commit$data)) {
                            break;
                        }

                        $payload = $data->getPayload();
                        if (empty($payload)) {
                            break;
                        }
                        $payload = $this->addVersionToPayload($payload$definition, Defaults::LIVE_VERSION);
                        $payload = $this->addTranslationToPayload($data->getEntityId()$payload$definition$commit);
                        $writes[$data->getAction()][$definition->getEntityName()][] = $payload;

                        break;
                    case 'delete':
                        $id = $data->getEntityId();
                        $id = $this->addVersionToPayload($id$definition, Defaults::LIVE_VERSION);
                        $writes['delete'][$definition->getEntityName()][] = $id;

                        break;
                }
            }
            
Home | Imprint | This part of the site doesn't use cookies.