• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/controller/productpropertysection.php
  • Класс: BitrixCatalogControllerProductPropertySection
  • Вызов: ProductPropertySection::setAction
public function setAction(int $propertyId, array $fields): ?array
{
	$checkPropertyResult = $this->checkProperty($propertyId);
	if (!$checkPropertyResult->isSuccess())
	{
		$this->addErrors($checkPropertyResult->getErrors());
		return null;
	}

	$property = $this->getPropertyById($propertyId);
	$fields['IBLOCK_ID'] = $property['IBLOCK_ID'];

	CIBlockSectionPropertyLink::Set(self::BLANK_SECTION, $propertyId, $fields);

	$result = $this->get($propertyId);
	if (!$result)
	{
		$this->addError(new Error('Error setting section properties'));
		return null;
	}

	return ['PRODUCT_PROPERTY_SECTION' => $this->get($propertyId)];
}