• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/exchange/profileimport.php
  • Класс: BitrixSaleExchangeProfileImport
  • Вызов: ProfileImport::load
public function load(array $fields)
    {
        $result = new SaleResult();

    	$r = $this->checkFields($fields);
        if(!$r->isSuccess())
        {
            throw new MainArgumentException('XML_ID is not defined');
        }

        $profileFields = $this->initFieldsProfile($fields, $arErrors);

        if(count($arErrors)>0)
	{
		foreach($arErrors as $error)
		{
			$result->addError(new  MainError(str_replace('
','', $error['TEXT']))); } } if(count($profileFields)>0) { $profile = new static(); $profile->setFields($profileFields); $this->setEntity($profile); } return $result; }