• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integration/documentgenerator/dataprovider/requisite.php
  • Класс: Bitrix\Crm\Integration\DocumentGenerator\DataProvider\Requisite
  • Вызов: Requisite::fetchData
protected function fetchData()
{
	if(!$this->isLoaded())
	{
		if($this->source > 0)
		{
			$resuisite = EntityRequisite::getSingleInstance();
			$this->data = $resuisite->getList(
				['select' => ['*', 'UF_*',], 'filter' => ['ID' => $this->source]]
			)->fetch();
			$this->data = array_merge($this->data, $resuisite->getRqListFieldValueTitles($this->data));
			$this->loadAddresses();
			$this->nameData = [
				'NAME' => $this->data['RQ_FIRST_NAME'],
				'SECOND_NAME' => $this->data['RQ_SECOND_NAME'],
				'LAST_NAME' => $this->data['RQ_LAST_NAME'],
			];
			$this->rawNameValues['RQ_FIRST_NAME'] = $this->data['RQ_FIRST_NAME'];
			$this->rawNameValues['RQ_SECOND_NAME'] = $this->data['RQ_SECOND_NAME'];
			$this->rawNameValues['RQ_LAST_NAME'] = $this->data['RQ_LAST_NAME'];
			unset($this->data['RQ_FIRST_NAME']);
			unset($this->data['RQ_SECOND_NAME']);
			unset($this->data['RQ_LAST_NAME']);
			foreach($this->getSmartNameFields() as $placeholder)
			{
				$this->rawNameValues[$placeholder] = $this->data[$placeholder];
				unset($this->data[$placeholder]);
			}
		}
	}

	return $this->data;
}