• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/ads/pixel/conversioneventtriggers/webformtrigger.php
  • Класс: Bitrix\Crm\Ads\Pixel\ConversionEventTriggers\WebFormTrigger
  • Вызов: WebFormTrigger::getUserData
public function getUserData() : array
		{
			$userData = [];
			if (!empty($this->form->get()))
			{
				if (empty($userData) && $id = $this->resultEntity->getEntityIdByTypeName(\CCrmOwnerType::ContactName))
				{
					if (!empty($data = $this->getContactUserData($id)))
					{
						$userData[] = $data;
					}
				}

				if (empty($userData) && $id = $this->resultEntity->getEntityIdByTypeName(\CCrmOwnerType::CompanyName))
				{
					if (!empty($data = $this->getCompanyUserData($id)))
					{
						$userData[] = $data;
					}
				}

				if (empty($userData) && $id = $this->resultEntity->getEntityIdByTypeName(\CCrmOwnerType::LeadName))
				{
					if ($lead = $this->getLead($id))
					{
						$userData = array_merge_recursive($userData,$this->getLeadUserData($lead));
					}
				}

				if (empty($userData) && $id = $this->resultEntity->getEntityIdByTypeName(\CCrmOwnerType::DealName))
				{
					if ($deal = $this->getDeal($id))
					{
						$userData = array_merge_recursive($userData,$this->getDealUserData($deal));
					}
				}
			}

			return $userData;
		}