src/ORM/FieldType/MultiValueField.php
public function setValue($value, $record = null, $markChanged = true)
    {
        $this->changed = $this->changed || $markChanged;
        if (!is_null($value)) {
            // so that subsequent getValue calls re-load the value item correctly
            $this->value = null;
            if (!is_string($value)) {
                $value = $this->serializeValue($value);
            }
            $value = ['Value' => $value];
        }
        return parent::setValue($value, $record, $markChanged);
    }
public function setValue($value, $record = null, $markChanged = true)
    {
        $this->changed = $this->changed || $markChanged;
        if (!is_null($value)) {
            // so that subsequent getValue calls re-load the value item correctly
            $this->value = null;
            if (!is_string($value)) {
                $value = $this->serializeValue($value);
            }
            $value = ['Value' => $value];
        }
        return parent::setValue($value, $record, $markChanged);
    }
public function setValue ( $ value , $ record = null , $ markChanged = true ) { $ this -> changed = $ this -> changed || $ markChanged ; if ( ! is_null ( $ value ) ) { // so that subsequent getValue calls re-load the value item correctly $ this -> value = null ; if ( ! is_string ( $ value ) ) { $ value = $ this -> serializeValue ( $ value ) ; } $ value = [ 'Value' => $ value ] ; } return parent :: setValue ( $ value , $ record , $ markChanged ) ; }
Set the value on the field. Ensures the underlying composite field
logic that looks for Value will trigger if the value set is


For a multivalue field, this will deserialise the value if it is a string

@param mixed $value
@param array $record
@return $this
Set the value on the field . Ensures the underlying composite field logic that looks for Value will trigger if the value set is