protected function createExistingFieldInNewVersion(Field $field, Content $content)
    {
        $originalField = clone $field;
        $field->versionNo = $content->versionInfo->versionNo;

        $this->contentGateway->insertExistingField(
            $content,
            $field,
            $this->mapper->convertToStorageValue($field)
        );

        // If the storage handler returns true, it means that $field value has been modified
        // So we need to update it in order to store those modifications
        // Field converter is called once again via the Mapper
        if ($this->storageHandler->copyFieldData($content->versionInfo, $field, $originalField) === true) {
            $this->contentGateway->updateField(
                $field,
                $this->mapper->convertToStorageValue($field)
            );
        }
    }
protected function createExistingFieldInNewVersion(Field $field, Content $content)
    {
        $originalField = clone $field;
        $field->versionNo = $content->versionInfo->versionNo;

        $this->contentGateway->insertExistingField(
            $content,
            $field,
            $this->mapper->convertToStorageValue($field)
        );

        // If the storage handler returns true, it means that $field value has been modified
        // So we need to update it in order to store those modifications
        // Field converter is called once again via the Mapper
        if ($this->storageHandler->copyFieldData($content->versionInfo, $field, $originalField) === true) {
            $this->contentGateway->updateField(
                $field,
                $this->mapper->convertToStorageValue($field)
            );
        }
    }
protected function createExistingFieldInNewVersion ( Field $ field , Content $ content ) { $ originalField = clone $ field ; $ field -> versionNo = $ content -> versionInfo -> versionNo ; $ this -> contentGateway -> insertExistingField ( $ content , $ field , $ this -> mapper -> convertToStorageValue ( $ field ) ) ; // If the storage handler returns true, it means that $field value has been modified // So we need to update it in order to store those modifications // Field converter is called once again via the Mapper if ( $ this -> storageHandler -> copyFieldData ( $ content -> versionInfo , $ field , $ originalField ) === true ) { $ this -> contentGateway -> updateField ( $ field , $ this -> mapper -> convertToStorageValue ( $ field ) ) ; } }
Creates an existing field in a new version, no new ID is generated.

Used to insert a field with an existing ID but a new version number.
$content is used for new version data, needed by Content gateway and external storage.

External data is being copied here as some FieldTypes require original field external data.
By default copying falls back to storing, it is upon external storage implementation to override
the behaviour as needed.

@param Field $field
@param Content $content
Creates an existing field in a new version no new ID is generated .