public function getVersions()
    {
        $record = $this->getRecord();
        $return = ArrayList::create();

        if ($record->hasExtension(Versioned::class)) {
            $versions = $record->AllVersions();

            foreach ($versions as $version) {
                $i = $version->Version;
                $diff = null;

                if ($i > 1) {
                    $frm = Versioned::get_version(
                        $record->ClassName,
                        $record->ID,
                        $i - 1
                    );
                    $to = Versioned::get_version(
                        $record->ClassName,
                        $record->ID,
                        $i
                    );
                    if ($frm && $to) {
                        $diff = DataDifferencer::create($frm, $to);
                        $diff->ignoreFields(["LastEdited"]);
                    }
                }

                $return->add(ArrayData::create(
                    [
                        "Version" => $version,
                        "Diff" => $diff
                    ]
                ));
            }
        }

        $this->extend("updateVersions", $versions);

        return $return;
    }