• Модуль: crmmobile
  • Путь к файлу: ~/bitrix/modules/crmmobile/lib/ProductGrid/UpdateCatalogProductsCommand.php
  • Класс: BitrixCrmMobileProductGridUpdateCatalogProductsCommand
  • Вызов: UpdateCatalogProductsCommand::execute
public function execute(): Result
{
	if (!$this->isCatalogProductEditPermitted())
	{
		return new Result();
	}

	return $this->mapVariations(function ($sku, $productRow) {
		/** @var BaseSku $sku */
		/** @var array $productRow */

		if (isset($productRow['PRODUCT_NAME']))
		{
			$this->updateName($sku, (string)$productRow['PRODUCT_NAME']);
		}

		if (isset($productRow['MEASURE_CODE']))
		{
			$this->updateMeasure($sku, (string)$productRow['MEASURE_CODE']);
		}

		if (isset($productRow['SECTIONS']))
		{
			$this->updateSections($sku, (array)$productRow['SECTIONS']);
		}

		if (isset($productRow['BARCODE']))
		{
			$this->updateBarcode($sku, (string)$productRow['BARCODE']);
		}

		if (isset($productRow['GALLERY']))
		{
			$this->updateImages($sku, $productRow['GALLERY']);
		}
	});
}