- Модуль: socialnetwork
- Путь к файлу: ~/bitrix/modules/socialnetwork/classes/general/event_user_view.php
- Класс: CAllSocNetEventUserView
- Вызов: CAllSocNetEventUserView::IsEntityEmpty
static function IsEntityEmpty($entityType, $entityID)
{
global $arSocNetAllowedEntityTypes;
$entityType = trim($entityType);
if (!in_array($entityType, $arSocNetAllowedEntityTypes))
{
$GLOBALS["APPLICATION"]->ThrowException(GetMessage("SONET_EUV_INCORRECT_ENTITY_TYPE"), "ERROR_INCORRECT_ENTITY_TYPE");
return false;
}
$entityID = intval($entityID);
if ($entityID <= 0)
{
$GLOBALS["APPLICATION"]->ThrowException(GetMessage("SONET_EUV_EMPTY_ENTITY_ID"), "ERROR_EMPTY_ENTITY_ID");
return false;
}
$iCnt = CSocNetEventUserView::GetList(array(), array("ENTITY_TYPE" => $entityType, "ENTITY_ID" => $entityID), array());
if (intval($iCnt) > 0)
return false;
else
return true;
}