public function updateFieldsTo(?string $initialLanguageCode, array $fields): self
    {
        $languageCodes = array_map(
            function (Field $field) {
                return $field->languageCode;
            },
            $fields
        );

        $this->targetVersionProperties['forUpdateInitialLanguageCode'] = $initialLanguageCode;
        $this->targetVersionProperties['forUpdateLanguageCodesList'] = array_values(
            array_unique($languageCodes)
        );

        return $this;
    }
public function updateFieldsTo(?string $initialLanguageCode, array $fields): self
    {
        $languageCodes = array_map(
            function (Field $field) {
                return $field->languageCode;
            },
            $fields
        );

        $this->targetVersionProperties['forUpdateInitialLanguageCode'] = $initialLanguageCode;
        $this->targetVersionProperties['forUpdateLanguageCodesList'] = array_values(
            array_unique($languageCodes)
        );

        return $this;
    }
public function updateFieldsTo ( ? string $ initialLanguageCode , array $ fields ) : self { $ languageCodes = array_map ( function ( Field $ field ) { return $ field -> languageCode ; } , $ fields ) ; $ this -> targetVersionProperties [ 'forUpdateInitialLanguageCode' ] = $ initialLanguageCode ; $ this -> targetVersionProperties [ 'forUpdateLanguageCodesList' ] = array_values ( array_unique ( $ languageCodes ) ) ; return $ this ; }
Set intent to update Content Version Fields.

@param string|null $initialLanguageCode
@param \eZ\Publish\API\Repository\Values\Content\Field[] $fields

@return self
Set intent to update Content Version Fields .