- Модуль: socialnetwork
- Путь к файлу: ~/bitrix/modules/socialnetwork/classes/general/log_tools.php
- Класс: CSocNetLogTools
- Вызов: CSocNetLogTools::FindLogEventByID
static function FindLogEventByID($event_id, $entity_type = false)
{
$arEvent = false;
$arSocNetLogEvents = CSocNetAllowed::GetAllowedLogEvents();
if (
array_key_exists($event_id, $arSocNetLogEvents)
&& array_key_exists("ENTITIES", $arSocNetLogEvents[$event_id])
)
{
if (
!$entity_type
|| ($entity_type && array_key_exists($entity_type, $arSocNetLogEvents[$event_id]["ENTITIES"]))
)
{
$arEvent = $arSocNetLogEvents[$event_id];
}
}
if (!$arEvent)
{
$arSocNetFeaturesSettings = CSocNetAllowed::GetAllowedFeatures();
foreach($arSocNetFeaturesSettings as $feature => $arFeature)
{
if (
array_key_exists("subscribe_events", $arFeature)
&& array_key_exists($event_id, $arFeature["subscribe_events"])
&& array_key_exists("ENTITIES", $arFeature["subscribe_events"][$event_id])
)
{
if (
!$entity_type
|| ($entity_type && array_key_exists($entity_type, $arFeature["subscribe_events"][$event_id]["ENTITIES"]))
)
$arEvent = $arFeature["subscribe_events"][$event_id];
break;
}
}
}
return $arEvent;
}