private function getSerializedDraftData()
    {
        $currentDraft = $this->getContent()->getDraft();
        $this->getContent()->setDraft(null);

        $sourceData = $this->getContent()->jsonSerialize(self::JSON_CONCISE_FORMAT);
        $this->getContent()->setDraft($currentDraft);
        $draftData = parent::jsonSerialize(self::JSON_CONCISE_FORMAT);

        $draftData['uid'] = $sourceData['uid'];
        $draftData['type'] = $sourceData['type'];
        $draftData['elements'] = $this->computeElements($sourceData['elements'], $draftData['elements']);

        $parameters = [];
        foreach ($draftData['parameters'] as $key => $parameter) {
            if ($parameter['value'] !== $sourceData['parameters'][$key]['value']) {
                $parameters[$key] = [
                    'current' => $sourceData['parameters'][$key]['value'],
                    'draft'   => $parameter['value'],
                ];
            }
        }

        $draftData['parameters'] = $parameters;

        if ($this->getRevision() !== $this->getContent()->getRevision()) {
            $draftData['state'] = self::STATE_CONFLICTED;
        }

        return $draftData;
    }
private function getSerializedDraftData()
    {
        $currentDraft = $this->getContent()->getDraft();
        $this->getContent()->setDraft(null);

        $sourceData = $this->getContent()->jsonSerialize(self::JSON_CONCISE_FORMAT);
        $this->getContent()->setDraft($currentDraft);
        $draftData = parent::jsonSerialize(self::JSON_CONCISE_FORMAT);

        $draftData['uid'] = $sourceData['uid'];
        $draftData['type'] = $sourceData['type'];
        $draftData['elements'] = $this->computeElements($sourceData['elements'], $draftData['elements']);

        $parameters = [];
        foreach ($draftData['parameters'] as $key => $parameter) {
            if ($parameter['value'] !== $sourceData['parameters'][$key]['value']) {
                $parameters[$key] = [
                    'current' => $sourceData['parameters'][$key]['value'],
                    'draft'   => $parameter['value'],
                ];
            }
        }

        $draftData['parameters'] = $parameters;

        if ($this->getRevision() !== $this->getContent()->getRevision()) {
            $draftData['state'] = self::STATE_CONFLICTED;
        }

        return $draftData;
    }
private function getSerializedDraftData ( ) { $ currentDraft = $ this -> getContent ( ) -> getDraft ( ) ; $ this -> getContent ( ) -> setDraft ( null ) ; $ sourceData = $ this -> getContent ( ) -> jsonSerialize ( self :: JSON_CONCISE_FORMAT ) ; $ this -> getContent ( ) -> setDraft ( $ currentDraft ) ; $ draftData = parent :: jsonSerialize ( self :: JSON_CONCISE_FORMAT ) ; $ draftData [ 'uid' ] = $ sourceData [ 'uid' ] ; $ draftData [ 'type' ] = $ sourceData [ 'type' ] ; $ draftData [ 'elements' ] = $ this -> computeElements ( $ sourceData [ 'elements' ] , $ draftData [ 'elements' ] ) ; $ parameters = [ ] ; foreach ( $ draftData [ 'parameters' ] as $ key => $ parameter ) { if ( $ parameter [ 'value' ] !== $ sourceData [ 'parameters' ] [ $ key ] [ 'value' ] ) { $ parameters [ $ key ] = [ 'current' => $ sourceData [ 'parameters' ] [ $ key ] [ 'value' ] , 'draft' => $ parameter [ 'value' ] , ] ; } } $ draftData [ 'parameters' ] = $ parameters ; if ( $ this -> getRevision ( ) !== $ this -> getContent ( ) -> getRevision ( ) ) { $ draftData [ 'state' ] = self :: STATE_CONFLICTED ; } return $ draftData ; }
Returns an array of information to be returned on not JSON_REVISON_FORMAT serialization.

@return array
Returns an array of information to be returned on not JSON_REVISON_FORMAT serialization .