• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/Configuration/Notification.php
  • Класс: BitrixImConfigurationNotification
  • Вызов: Notification::getSimpleNotifySettings
static function getSimpleNotifySettings(array $generalSettings): array
{
	$defaultGeneralSettings = General::getDefaultSettings();

	$send['SITE'] = $generalSettings['notifySchemeSendSite'] ?? $defaultGeneralSettings['notifySchemeSendSite'];
	$send['MAIL'] = $generalSettings['notifySchemeSendEmail'] ?? $defaultGeneralSettings['notifySchemeSendEmail'];
	$send['XMPP'] = $generalSettings['notifySchemeSendXmpp'] ?? $defaultGeneralSettings['notifySchemeSendXmpp'];
	$send['PUSH'] = $generalSettings['notifySchemeSendPush'] ?? $defaultGeneralSettings['notifySchemeSendPush'];

	$notifySettings = Notification::getDefaultSettings();

	foreach ($notifySettings as $moduleId => $moduleSchema)
	{
		foreach ($moduleSchema['NOTIFY'] as $eventName => $eventSchema)
		{
			foreach (['SITE', 'MAIL', 'XMPP', 'PUSH'] as $type)
			{
				if ($eventSchema['DISABLED'][$type])
				{
					continue;
				}

				$notifySettings[$moduleId]['NOTIFY'][$eventName][$type] =
					!$send[$type]
						? false
						: $eventSchema[$type]
				;
			}
		}
	}

	return $notifySettings;
}