• Модуль: imbot
  • Путь к файлу: ~/bitrix/modules/imbot/lib/bot/supportbox.php
  • Класс: BitrixImBotBotSupportBox
  • Вызов: SupportBox::getBotSettings
static function getBotSettings(array $params = []): ?array
{
	static $result;
	if (empty($result))
	{
		$settings = parent::getBotSettings($params);
		if (empty($settings))
		{
			return null;
		}

		$result = [];
		$mirrors = [
			self::OPTION_BOT_CODE => 'support24_box_code',
			self::OPTION_BOT_NAME => 'support24_box_name',
			self::OPTION_BOT_DESC => 'support24_box_desc',
			self::OPTION_BOT_AVATAR => 'support24_box_avatar',
			self::OPTION_BOT_MESSAGES => 'support24_box_messages',
			MixinOPTION_BOT_QUESTION_LIMIT => 'support24_session_limit',
		];
		foreach ($mirrors as $prop => $alias)
		{
			if (isset($settings[$alias]))
			{
				$result[$prop] = $settings[$alias];
			}
		}
	}

	return $result;
}