• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/Configuration/General.php
  • Класс: BitrixImConfigurationGeneral
  • Вызов: General::getGroupSettings
static function getGroupSettings(int $groupId): array
{
	$defaultSettings = self::getDefaultSettings();

	$query =
		OptionStateTable::query()
		->setSelect(['NAME', 'VALUE'])
		->where('GROUP_ID', $groupId)
		->whereLike('NAME', static::ENTITY.'%')
	;

	$settings = [];
	foreach ($query->exec() as $rowSetting)
	{
		$settings[$rowSetting['NAME']] = $rowSetting['VALUE'];
	}

	if (empty($settings))
	{
		return $defaultSettings;
	}

	$settings = static::decodeSettings($settings);

	return array_replace_recursive($defaultSettings, $settings);
}