1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
IntegrationService.php
См. документацию.
1<?php
2
3declare(strict_types=1);
4
5namespace Bitrix\Rest\Service;
6
7use Bitrix\Main\ModuleManager;
8use Bitrix\Rest\Contract;
9use Bitrix\Rest\Entity\Collection\IntegrationCollection;
10
12{
13 public function __construct(
14 private readonly Contract\Repository\IntegrationRepository $integrationRepository,
15 )
16 {}
17
19 {
21 {
22 $collection = $this->integrationRepository->getCloudPaidIntegrations();
23 }
24 else
25 {
26 $collection = $this->integrationRepository->getBoxedPaidIntegrations();
27 }
28
29 return $collection;
30 }
31
32 public function hasPaidIntegrations(): bool
33 {
34 return ModuleManager::isModuleInstalled('bitrix24')
35 ? $this->integrationRepository->hasUserIntegrations()
36 : $this->integrationRepository->hasNotInWebhookUserIntegrations();
37 }
38}
static isModuleInstalled($moduleName)
Определения modulemanager.php:125
__construct(private readonly Contract\Repository\IntegrationRepository $integrationRepository,)
Определения IntegrationService.php:13