• Модуль: imopenlines
  • Путь к файлу: ~/bitrix/modules/imopenlines/lib/widget/formhandler.php
  • Класс: BitrixImOpenLinesWidgetFormHandler
  • Вызов: FormHandler::init
private function init(): bool
{
	$parsedOpenlinesCode = Chat::parseLinesChatEntityId($this->userCode);
	$this->connectorId = $parsedOpenlinesCode['connectorId'];
	$this->configId = $parsedOpenlinesCode['lineId'];
	$this->clientChatId = $parsedOpenlinesCode['connectorChatId'];
	$this->userId = $parsedOpenlinesCode['connectorUserId'];

	if (!$this->configId || !$this->clientChatId || !$this->userId)
	{
		$this->errorCollection[] = new Error('User code error', self::ERROR_USER_CODE);

		return false;
	}

	if (!$this->initCrmFields())
	{
		return false;
	}
	if (!$this->initChat())
	{
		return false;
	}
	$this->initConfig();
	$this->initUser();

	return true;
}