public static function GetNotifySchema() { if (is_null(self::$arNotifySchema)) { self::$arNotifySchema = array(); foreach (GetModuleEvents("im", "OnGetNotifySchema", true) as $arEvent) { $ar = ExecuteModuleEventEx($arEvent); if (is_array($ar)) { foreach ($ar as $moduleId => $arNotifyType) { self::$arNotifySchema[$moduleId]['NAME'] = isset($arNotifyType['NOTIFY']) && isset($arNotifyType['NAME']) ? $arNotifyType['NAME'] : ''; $arNotify = $arNotifyType; if (isset($arNotifyType['NOTIFY'])) { $arNotify = $arNotifyType['NOTIFY']; } foreach ($arNotify as $notifyEvent => $arConfig) { $arConfig['SITE'] = true; $arConfig['MAIL'] = true; $arConfig['XMPP'] = true; self::$arNotifySchema[$moduleId]['NOTIFY'][$notifyEvent] = $arConfig; } } } } } return self::$arNotifySchema; }
public static function GetNotifySchema() { if (is_null(self::$arNotifySchema)) { self::$arNotifySchema = array(); foreach (GetModuleEvents("im", "OnGetNotifySchema", true) as $arEvent) { $ar = ExecuteModuleEventEx($arEvent); if (is_array($ar)) { foreach ($ar as $moduleId => $arNotifyType) { self::$arNotifySchema[$moduleId]['NAME'] = isset($arNotifyType['NOTIFY']) && isset($arNotifyType['NAME']) ? $arNotifyType['NAME'] : ''; $arNotify = $arNotifyType; if (isset($arNotifyType['NOTIFY'])) { $arNotify = $arNotifyType['NOTIFY']; } foreach ($arNotify as $notifyEvent => $arConfig) { if (!isset($arConfig['PUSH']) || $arConfig['PUSH'] == 'NONE') { $arConfig['DISABLED'][] = IM_NOTIFY_FEATURE_PUSH; } $arConfig['SITE'] = !isset($arConfig['SITE']) || $arConfig['SITE'] == 'Y' ? true : false; $arConfig['MAIL'] = !isset($arConfig['MAIL']) || $arConfig['MAIL'] == 'Y' ? true : false; $arConfig['XMPP'] = !isset($arConfig['XMPP']) || $arConfig['XMPP'] == 'Y' ? true : false; $arConfig['PUSH'] = isset($arConfig['PUSH']) && $arConfig['PUSH'] == 'Y' ? true : false; $arDisabled['SITE'] = isset($arConfig['DISABLED']) && in_array(IM_NOTIFY_FEATURE_SITE, $arConfig['DISABLED']) ? true : false; $arDisabled['MAIL'] = isset($arConfig['DISABLED']) && in_array(IM_NOTIFY_FEATURE_MAIL, $arConfig['DISABLED']) ? true : false; $arDisabled['XMPP'] = isset($arConfig['DISABLED']) && in_array(IM_NOTIFY_FEATURE_XMPP, $arConfig['DISABLED']) ? true : false; $arDisabled['PUSH'] = isset($arConfig['DISABLED']) && in_array(IM_NOTIFY_FEATURE_PUSH, $arConfig['DISABLED']) ? true : false; $arConfig['DISABLED'] = $arDisabled; $arConfig['LIFETIME'] = intval($arConfig['LIFETIME']); self::$arNotifySchema[$moduleId]['NOTIFY'][$notifyEvent] = $arConfig; } } } } } return self::$arNotifySchema; }
public static function GetNotifySchema() { if (is_null(self::$arNotifySchema)) { self::$arNotifySchema = array(); foreach (GetModuleEvents("im", "OnGetNotifySchema", true) as $arEvent) { $ar = ExecuteModuleEventEx($arEvent); if (is_array($ar)) { foreach ($ar as $moduleId => $arNotifyType) { foreach ($arNotifyType as $notifyEvent => $arConfig) { $arConfig['ID'] = $notifyEvent; self::$arNotifySchema[$moduleId][$notifyEvent] = $arConfig; } } } } } return self::$arNotifySchema; }