• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/v2/Image/MorePhotoImage.php
  • Класс: BitrixCatalogv2ImageMorePhotoImage
  • Вызов: MorePhotoImage::remove
public function remove(): BaseEntity
{
	/** @var  $parent BaseIblockElementEntity */
	if ($parent = $this->getParent())
	{
		$property = $parent->getPropertyCollection()->findByCode(MorePhotoImage::CODE);
		if ($property)
		{
			$valueCollection = $property->getPropertyValueCollection();

			foreach ($valueCollection as $item)
			{
				if ((int)$item->getValue() === $this->getId())
				{
					$valueCollection->remove($item);
					break;
				}
			}
		}
	}

	return parent::remove();
}