• Модуль: socialnetwork
  • Путь к файлу: ~/bitrix/modules/socialnetwork/classes/general/functions.php
  • Класс: CSocNetAllowed
  • Вызов: CSocNetAllowed::addAllowedEntityType
static function addAllowedEntityType($entityType)
{
	if (is_array($entityType))
	{
		foreach ($entityType as $tmp)
		{
			self::AddAllowedEntityType($tmp);
		}
		return true;
	}

	$entityType = trim($entityType);
	if (
		$entityType == ''
		|| in_array($entityType, self::$arAllowedEntityTypes)
		|| !preg_match('/^[a-zA-Z0-9]+$/', $entityType)
	)
	{
		return false;
	}

	if (
		$entityType == SONET_SUBSCRIBE_ENTITY_GROUP
		&& !CBXFeatures::IsFeatureEnabled("Workgroups")
	)
	{
		return false;
	}

	self::$arAllowedEntityTypes[] = $entityType;
}