• Модуль: lists
  • Путь к файлу: ~/bitrix/modules/lists/classes/general/listfield.php
  • Класс: CListElementField
  • Вызов: CListElementField::Update
public function Update($arFields)
{
	/** @global CStackCacheManager $stackCacheManager */
	global $stackCacheManager;
	if(isset($arFields["TYPE"]))
		$newType = $arFields["TYPE"];
	else
		$newType = $this->GetTypeID();

	if($this->_iblock_id > 0 && CListFieldTypeList::IsField($newType))
	{
		$arIBlockFields = CIBlock::GetArrayByID($this->_iblock_id, "FIELDS");
		$arIBlockFields[$newType] = $arFields;
		CIBlock::SetFields($this->_iblock_id, $arIBlockFields);
		$stackCacheManager->Clear("b_iblock");

		if($newType != $this->GetTypeID())
			$this->Delete();

		return new CListElementField($this->_iblock_id, $newType, $arFields["NAME"], $arFields["SORT"]);
	}

	return null;
}