• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/controller/productpropertybase.php
  • Класс: BitrixCatalogControllerProductPropertyBase
  • Вызов: ProductPropertyBase::checkFieldsBeforeModify
protected function checkFieldsBeforeModify(array $fields): Result
{
	$result = new Result();

	$newPropertyId = (int)$fields['PROPERTY_ID'];
	$checkPropertyResult = $this->checkProperty($newPropertyId);
	if (!$checkPropertyResult->isSuccess())
	{
		$result->addErrors($checkPropertyResult->getErrors());
		return $result;
	}

	$newProperty = $this->getPropertyById($newPropertyId);
	$iblockPermissionsCheckResult = $this->checkIblockModifyPermission($newProperty['IBLOCK_ID']);
	if (!$iblockPermissionsCheckResult->isSuccess())
	{
		$result->addErrors($iblockPermissionsCheckResult->getErrors());
		return $result;
	}

	return $result;
}