src/Modelling/ModelState.php
public function takeChangeSnapshot()
    {
        $this->changeSnapshotData = $this->modelData;

        foreach ($this->changeSnapshotData as $key => $value) {
            if (is_object($value)) {
                $this->changeSnapshotData[$key] = clone $value;
            }
        }

        return $this->changeSnapshotData;
    }
public function takeChangeSnapshot()
    {
        $this->changeSnapshotData = $this->modelData;

        foreach ($this->changeSnapshotData as $key => $value) {
            if (is_object($value)) {
                $this->changeSnapshotData[$key] = clone $value;
            }
        }

        return $this->changeSnapshotData;
    }
public function takeChangeSnapshot ( ) { $ this -> changeSnapshotData = $ this -> modelData ; foreach ( $ this -> changeSnapshotData as $ key => $ value ) { if ( is_object ( $ value ) ) { $ this -> changeSnapshotData [ $ key ] = clone $ value ; } } return $ this -> changeSnapshotData ; }
Takes a snapshot of the model data into change state data.

Essentially this resets the change status on the model object. HasChanged() should return
false after a call to this.

@return array
Takes a snapshot of the model data into change state data .