Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
crmtilemap.php
1<?php
2
4
8
9Loc::loadMessages(__FILE__);
10
11final class CrmTileMap
12{
13 private static function getFacebookConversionList() : array
14 {
15 if (!Loader::includeModule('crm') || !Loader::includeModule('seo'))
16 {
17 return [];
18 }
19
20 if (Integration\Bitrix24\Service::isRegionRussian(true))
21 {
22 return [];
23 }
24
25 return [
26 [
27 'CODE' => 'facebook_conversion_deal',
28 'NAME' => Loc::getMessage('SENDER_INTEGRATION_CRM_FACEBOOK_TILE_MAP_CONVERSION_DEAL'),
29 'IS_AVAILABLE' => true,
30 'ICON_CLASS' => 'ui-icon ui-icon-service-fb',
31 ],
32 [
33 'CODE' => 'facebook_conversion_webform',
34 'NAME' => Loc::getMessage('SENDER_INTEGRATION_CRM_FACEBOOK_TILE_MAP_CONVERSION_WEBFORM'),
35 'IS_AVAILABLE' => true,
36 'ICON_CLASS' => 'ui-icon ui-icon-service-fb'
37 ],
38 [
39 'CODE' => 'facebook_conversion_payment',
40 'NAME' => Loc::getMessage('SENDER_INTEGRATION_CRM_FACEBOOK_TILE_MAP_CONVERSION_PAYMENT'),
41 'IS_AVAILABLE' => true,
42 'ICON_CLASS' => 'ui-icon ui-icon-service-fb'
43 ],
44 [
45 'CODE' => 'facebook_conversion_lead',
46 'NAME' => Loc::getMessage('SENDER_INTEGRATION_CRM_FACEBOOK_TILE_MAP_CONVERSION_LEAD'),
47 'IS_AVAILABLE' => true,
48 'ICON_CLASS' => 'ui-icon ui-icon-service-fb'
49 ],
50 ];
51 }
52
53 public static function getFacebookConversion() : array
54 {
55 return [
56 'LIST' => $list = static::getFacebookConversionList(),
57 'FEATURED_LIST' => [],
58 'OTHER_LIST' => [],
59 'TILES' => array_map(
60 static function(array $item) : array {
61 return [
62 'id' => $item['CODE'],
63 'name' => $item['NAME'],
64 'selected' => $item['IS_AVAILABLE'],
65 'iconClass' => $item['ICON_CLASS'],
66 'data' => [
67 'code' => $item['CODE']
68 ],
69 ];
70 },$list)
71 ];
72 }
73}
static loadMessages($file)
Definition loc.php:64
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29