• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/orm/objectify/collection.php
  • Класс: BitrixMainORMObjectifyCollection
  • Вызов: Collection::sysGetChanges
public function sysGetChanges()
{
	$changes = [];

	foreach ($this->_objectsChanges as $srPrimary => $changeCode)
	{
		if (isset($this->_objects[$srPrimary]))
		{
			$changedObject = $this->_objects[$srPrimary];
		}
		elseif (isset($this->_objectsRemoved[$srPrimary]))
		{
			$changedObject = $this->_objectsRemoved[$srPrimary];
		}
		else
		{
			$changedObject = null;
		}

		if (empty($changedObject))
		{
			throw new SystemException(sprintf(
				'Object with primary `%s` was not found in `%s` collection', $srPrimary, get_class($this)
			));
		}

		$changes[] = [$changedObject, $changeCode];
	}

	return $changes;
}