• Модуль: socialnetwork
  • Путь к файлу: ~/bitrix/modules/socialnetwork/classes/general/functions.php
  • Класс: CSocNetAllowed
  • Вызов: CSocNetAllowed::RunEventForAllowedEntityType
static function RunEventForAllowedEntityType()
{
	global $arSocNetAllowedSubscribeEntityTypesDesc;
	$arSocNetAllowedSubscribeEntityTypesDesc = array();

	$newAllowedEntityTypes = array();

	$events = GetModuleEvents("socialnetwork", "OnFillSocNetAllowedSubscribeEntityTypes");
	while ($arEvent = $events->Fetch())
	{
		ExecuteModuleEventEx($arEvent, array(&$newAllowedEntityTypes));
	}

	foreach($newAllowedEntityTypes as $entityType)
	{
		self::AddAllowedEntityType($entityType);
	}

	foreach($arSocNetAllowedSubscribeEntityTypesDesc as $entityTypeDescCode => $arEntityTypeDesc)
	{
		self::AddAllowedEntityTypeDesc($entityTypeDescCode, $arEntityTypeDesc);
	}

	unset($arSocNetAllowedSubscribeEntityTypesDesc);
}