• Модуль: salescenter
  • Путь к файлу: ~/bitrix/modules/salescenter/lib/delivery/handlers/handlersrepository.php
  • Класс: BitrixSalesCenterDeliveryHandlersHandlersRepository
  • Вызов: HandlersRepository::getCollection
public function getCollection(): HandlersCollection
{
	if (!is_null(static::$collection))
	{
		return static::$collection;
	}

	static::$collection = new HandlersCollection();

	$handlers = DeliveryServicesManager::getHandlersList();

	foreach ($handlers as $handlerClassName)
	{
		$handler = Factory::make($handlerClassName);
		if (is_null($handler) || !$handler->isAvailable())
		{
			continue;
		}

		static::$collection->add($handler);
	}

	$restHandlers = DeliveryServicesManager::getRestHandlerList();
	foreach ($restHandlers as $restHandler)
	{
		$handler = Factory::makeRest($restHandler['CODE']);
		static::$collection->add($handler);
	}

	return static::$collection;
}