MarketingService::getAdsProvider

  1. Bitrix24 API (v. 23.675.0)
  2. sender
  3. MarketingService
  4. getAdsProvider
  • Модуль: sender
  • Путь к файлу: ~/bitrix/modules/sender/lib/integration/seo/ads/marketingservice.php
  • Класс: Bitrix\Sender\Integration\Seo\Ads\MarketingService
  • Вызов: MarketingService::getAdsProvider
static function getAdsProvider($adsType, $clientId = null)
{
	$service = Marketing\Configurator::getService();
	$service->setClientId($clientId);
	$providers = Marketing\Configurator::getProviders([$adsType]);
	$isFound = false;
	$provider = array();
	foreach ($providers as $type => $provider)
	{
		if ($type == $adsType)
		{
			$isFound = true;
			break;
		}
	}

	if (!$isFound)
	{
		return null;
	}

	return $provider;
}

Добавить комментарий