• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/V2/Chat.php
  • Класс: BitrixImV2Chat
  • Вызов: Chat::setType
public function setType(string $type): self
{
	if (!in_array($type, self::IM_TYPES))
	{
		if (in_array($type, array_keys(self::IM_TYPES_TRANSLATE), true))
		{
			$type = self::IM_TYPES_TRANSLATE[$type];
		}
		else
		{
			$type = $this->getDefaultType();
		}
	}

	$this->type = $type;
	return $this;
}