• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/v2/BaseIblockElementEntity.php
  • Класс: BitrixCatalogv2BaseIblockElementEntity
  • Вызов: BaseIblockElementEntity::saveInternal
public function saveInternal(): Result
{
	$entityChanged = $this->isChanged();
	if ($entityChanged && !$this->hasChangedFields())
	{
		$this->setField('MODIFIED_BY', CurrentUser::get()->getId());
	}

	$propertyCollectionChanged = $this->propertyCollection && $this->propertyCollection->isChanged();
	$imageCollectionChanged = $this->imageCollection && $this->imageCollection->isChanged();

	$result = parent::saveInternal();

	if ($result->isSuccess())
	{
		if ($entityChanged)
		{
			CIBlock::clearIblockTagCache($this->getIblockId());
		}

		// ToDo reload if at least one file property changed?
		if ($propertyCollectionChanged)
		{
			// hack to re-initialize saved ids from database after files saving
			$this->unsetPropertyCollection();
		}

		if ($imageCollectionChanged)
		{
			// hack to re-initialize saved ids from database after files saving
			$this->unsetImageCollection();
		}
	}

	return $result;
}