• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/ads/adsservice.php
  • Класс: Bitrix\Crm\Ads\AdsService
  • Вызов: AdsService::getServiceTypes
static function getServiceTypes()
{
	if (!static::canUse())
	{
		return array();
	}

	$service = static::getService();
	$types = $service->getTypes();
	if (!Loader::includeModule('bitrix24') || in_array(\CBitrix24::getPortalZone(), ['ru', 'kz', 'by']))
	{
		return $types;
	}

	$result = [];
	foreach ($types as $type)
	{
		if ($type === $service::TYPE_VKONTAKTE)
		{
			continue;
		}

		$result[] = $type;
	}

	return $result;
}