• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/tradebindingcollection.php
  • Класс: BitrixSaleTradeBindingCollection
  • Вызов: TradeBindingCollection::getTradingPlatform
public function getTradingPlatform(string $platformCode, string $type = null)
{
	foreach ($this->collection as $item)
	{
		$tradingPlatform = $item->getTradePlatform();
		if (!$tradingPlatform || $tradingPlatform::TRADING_PLATFORM_CODE !== $platformCode)
		{
			continue;
		}

		if (!is_null($type) && !$tradingPlatform->isOfType($type))
		{
			continue;
		}

		return $tradingPlatform;
	}

	return null;
}