1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
integration.php
См. документацию.
1<?php
2
3namespace Bitrix\Rest\Controller;
4
5use Bitrix\Main\Web\Uri;
6use Bitrix\Rest\Marketplace\Client;
7use Bitrix\Rest\Service\ServiceContainer;
8
10{
11 public function getApplicationListAction(int $limit): array
12 {
13 $collection = ServiceContainer::getInstance()->getAppService()->getPaidApplications($limit);
14 $appCodes = $collection->getAppCodes();
15
16 $applications = [];
17 if (!empty($appCodes))
18 {
19 $appsBuy = Client::getBuy($appCodes);
20 if (isset($appsBuy['ITEMS']) && is_array($appsBuy['ITEMS']))
21 {
22 foreach ($appsBuy['ITEMS'] as $key => $app) {
23 $applications[] = [
24 'name' => htmlspecialcharsbx($app['NAME']) ?? null,
25 'icon' => $app['ICON'] ? Uri::urnEncode($app['ICON']) : null
26 ];
27
28 if ($limit > 0 && count($applications) === $limit)
29 {
30 break;
31 }
32 }
33 }
34 }
35
36 return [
37 'count' => $collection->count(),
38 'items' => $applications
39 ];
40 }
41
42 public function getIntegrationListAction(int $limit): array
43 {
44 $collection = ServiceContainer::getInstance()->getIntegrationService()->getPaidIntegrations($limit);
45
46 $integrations = [];
47 foreach ($collection as $integration)
48 {
49 $integrations[] = [
50 'name' => htmlspecialcharsbx($integration->getTitle())
51 ];
52
53 if ($limit > 0 && count($integrations) === $limit)
54 {
55 break;
56 }
57 }
58
59 return [
60 'count' => $collection->count(),
61 'items' => $integrations
62 ];
63 }
64}
getApplicationListAction(int $limit)
Определения integration.php:11
getIntegrationListAction(int $limit)
Определения integration.php:42
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$app
Определения proxy.php:8
htmlspecialcharsbx($string, $flags=ENT_COMPAT, $doubleEncode=true)
Определения tools.php:2701
if(empty($signedUserToken)) $key
Определения quickway.php:257
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"
Определения waybill.php:936