• Модуль: report
  • Путь к файлу: ~/bitrix/modules/report/lib/visualconstructor/internal/model.php
  • Класс: BitrixReportVisualConstructorInternalModel
  • Вызов: Model::getChangedOrmAttributes
private function getChangedOrmAttributes($newEntityAttributes)
{

	/**
	 * DONE
	 * Optimise here: maybe add some property where will located state of values of entity when it select from DB
	 */
	$oldEntityAttributes = $this->getCurrentDbState();
	unset($oldEntityAttributes['CREATED_DATE']);
	unset($oldEntityAttributes['UPDATED_DATE']);
	unset($newEntityAttributes['CREATED_DATE']);
	unset($newEntityAttributes['UPDATED_DATE']);
	$result = array();
	foreach ($oldEntityAttributes as $key => $value)
	{
		if ($newEntityAttributes[$key] != $value)
		{
			$result[$key] = $newEntityAttributes[$key];
		}
	}

	return $result;
}