Returns a list of changes that actually took place, while processing a given event.

@return array
771951
protected function getRecordedChanges()
    {
        $recorded_changes = [];

        foreach ($this->getChanges() as $value_changed_event) {
            $attribute = $this->getType()->getAttribute($value_changed_event->getAttributeName());
            if ($attribute instanceof EmbeddedEntityListAttribute) {
                continue;
            }
            $recorded_changes[$attribute->getName()] = $value_changed_event->getNewValue();
        }

        return $recorded_changes;
    }
799517
protected function commitChanges(): array
    {
        $updated = [];
        foreach ($this->sortedTables() as $table) {
            if ($table->getStatus() == AbstractTable::STATUS_DECLARED_DROPPED) {
                $table->save(HandlerInterface::DO_DROP);
                continue;
            }

            $updated[] = $table;
            $table->save(
                HandlerInterface::DO_ALL
                ^ HandlerInterface::DROP_FOREIGN_KEYS
                ^ HandlerInterface::DROP_INDEXES
                ^ HandlerInterface::CREATE_FOREIGN_KEYS
            );
        }

        return $updated;
    }
417039
public function getDiffDeletions()
    {
        $data = $this->getValueDiffData('getDiffDeletions');
        foreach ($this->tracker->getDeletions() as $name) {
            $data[$name] = array();
        }
        return $data;
    }
349436
protected function changedRevisionableFields()
    {
        $changes = [];
        foreach ($this->dirtyData as $key => $value) {
            // check that the field is revisionable, and the data is dirty enough
            if ($this->isRevisionable($key) && !is_array($value)) {
                if (is_object($original = array_get($this->originalData, $key)) || is_string($original)) {
                    $original = trim($original);
                }

                if (is_object($updated = array_get($this->updatedData, $key)) || is_string($updated)) {
                    $updated = trim($updated);
                }

                if ($original != $updated) {
                    $changes[$key] = $value;
                }
            } else {
                // if it's not dirty enough, then remove the field from the array
                unset($this->updatedData[$key]);
                unset($this->originalData[$key]);
            }
        }

        return $changes;
    }
664396
protected function getChanges(): Changes
    {
        if (null === $this->changes) {
            $this->changes = new Changes();
        }

        return $this->changes;
    }
578946
public function pagesAffectedByChanges()
    {
        $pages = $this->Pages();
        $urls = [];
        foreach ($pages as $page) {
            $urls[] = $page->Link();
        }

        return $urls;
    }
497675
public function findRunningChangeset()
    {
        $qb = $this->createQueryBuilder('ac')
            ->select('ac')
            ->where('ac.status = :status')
            ->addOrderBy('ac.id', 'ASC')
            ->setMaxResults(1)
            ->setParameter('status', AclChangeset::STATUS_RUNNING);

        return $qb->getQuery()->getOneOrNullResult();
    }
557625
protected function getAvailableChangeSets()
    {
        return ChangeSet::get()
            ->filter('State', ChangeSet::STATE_OPEN)
            ->filterByCallback(function ($item) {
                /** @var ChangeSet $item */
                return $item->canView();
            });
    }
1026882
public function getChangeSet()
    {
        $changeset = parent::getChangeSet();
        $changeset['hasOne']  = $this->filterNotSavedProperties($this->hasOneRelationships->calculateChangeSet());
        $changeset['hasMany'] = $this->filterNotSavedProperties($this->hasManyRelationships->calculateChangeSet());
        return $changeset;
    }
1281269
public function getDiffs() {
    $diffs = array();
    foreach ($this->diffs as $diff) {
      if ($diff[1] !== self::OLD) {
        $diffs[] = $diff;
      } 
    }
    return $diffs;
  }
1308572
public List<Change> asAddedChanges() {
        final List<Change> changes = new ArrayList<>();
        for (final HourRange hr : hourRanges) {
            changes.add(new Change(ChangeType.ADDED, dayOfTheWeek, hr));
        }
        return changes;
    }
682845
public function getAllActiveEvents(): array
    {
        $activeEvents = [];
        foreach (self::$eventsMap as $eventName => $eventClass) {
            if (!class_exists($eventClass)) {
                continue;
            }

            $activeEvents[] = $eventName;
        }

        $listeners = $this->eventDispatcher->getListeners();
        $activeEvents = array_unique(array_merge($activeEvents, array_keys($listeners)));

        asort($activeEvents);

        return $activeEvents;
    }
1115843
public function getChanges()
    {
        $response = $this->client->request('GET', "/{$this->name}/_changes");

        if (200 !== $response->getStatusCode()) {
            throw new Exception('Request wasn\'t successfull');
        }

        return JSONEncoder::decode((string) $response->getBody());
    }
1189326
public function hasChange()
    {
        return (
            count($this->getFieldsWithUpdate()) > 0
            || count($this->getIndexesWithUpdate()) > 0
            || $this->addSoftDelete
            || $this->dropSoftDelete
            || $this->addTimestamps
            || $this->dropTimestamps);
    }
373938
protected function getListItems()
    {
        $changesets = ChangeSet::get();
        // Filter out published items if disabled
        if (!$this->config()->get('show_published')) {
            $changesets = $changesets->filter('State', ChangeSet::STATE_OPEN);
        }
        // Filter out automatically created changesets
        if (!$this->config()->get('show_inferred')) {
            $changesets = $changesets->filter('IsInferred', 0);
        }
        return $changesets
            ->filterByCallback(function ($item) {
                /** @var ChangeSet $item */
                return ($item->canView());
            });
    }
1343275
protected function processUpdates() {
    $updatedOids = [];
    $updateOids = array_keys($this->dirtyObjects);
    while (sizeof($updateOids) > 0) {
      $key = array_shift($updateOids);
      if (self::$isDebugEnabled) {
        self::$logger->debug("Process update on object: ".$key);
      }
      $object = $this->dirtyObjects[$key];
      $object->getMapper()->save($object);
      unset($this->dirtyObjects[$key]);
      $updatedOids[] = $key;
      $updateOids = array_keys($this->dirtyObjects);
    }
    return $updatedOids;
  }
1087410
public function getChanged()
    {
        $values = [];

        foreach (array_keys($this->changed) as $key) {
            $values[$key] = array_key_exists($key, $this->attributes) ? $this->attributes[$key] : null;
        }

        return $values;
    }