• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/classes/general/im_rest.php
  • Класс: CIMRestService
  • Вызов: CIMRestService::notifySchemaGet
static function notifySchemaGet($arParams, $n, CRestServer $server): array
{
	$schemaResult = [];
	$schema = CIMNotifySchema::GetNotifySchema();
	foreach ($schema as $moduleId => $notifyTypes)
	{
		$list = [];
		foreach ($notifyTypes['NOTIFY'] as $notifyId => $notify)
		{
			$list[] = [
				'ID' => $moduleId.'|'.$notifyId,
				'NAME' => $notify['NAME']
			];
		}

		if ($notifyTypes['NAME'] === '')
		{
			$module = CModule::CreateModuleObject($moduleId);
			$moduleName = $module->MODULE_NAME;
		}
		else
		{
			$moduleName = $notifyTypes['NAME'];
		}

		$schemaResult[$moduleId] = [
			'NAME' => $moduleName,
			'MODULE_ID' => $moduleId,
			'LIST' => $list,
		];
	}

	return $schemaResult;
}