• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/orm/objectify/collection.php
  • Класс: BitrixMainORMObjectifyCollection
  • Вызов: Collection::sysResetChanges
public function sysResetChanges($rollback = false)
{
	if ($rollback)
	{
		foreach ($this->_objectsChanges as $srPrimary => $changeCode)
		{
			if ($changeCode === static::OBJECT_ADDED)
			{
				unset($this->_objects[$srPrimary]);
			}
			elseif ($changeCode === static::OBJECT_REMOVED)
			{
				$this->_objects[$srPrimary] = $this->_objectsRemoved[$srPrimary];
			}
		}
	}

	$this->_objectsChanges = [];
	$this->_objectsRemoved = [];
}