1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
managerexport.php
См. документацию.
1<?php
2
3namespace Bitrix\Sale\Exchange;
4
5
6
7use Bitrix\Sale\Exchange\Internals\LoggerDiag;
8
9final class ManagerExport extends ManagerBase
10{
11 const SALE_MODE = 1;
12 const B24_MODE = 2;
13 const SALE_B24_MODE = 3;
14 const B24_SALE_MODE = 4;
15
19 static public function getDirectionType()
20 {
21 return self::EXCHANGE_DIRECTION_EXPORT;
22 }
23
27 static public function configure(ImportBase $entity)
28 {
29 $config = static::getImportByType($entity->getOwnerTypeId());
30
31 $entity->loadSettings($config->settings);
32 $entity->loadLogger($config->logger);
33 }
34
42 static public function registerInstance($typeId, ISettingsExport $settings)
43 {
44 static::IsDefinedTypeId($typeId);
45
46 if(self::$instance[$typeId] === null)
47 {
48 $manager = new static();
49 $manager->settings = $settings;
50 $manager->logger = new LoggerDiag();
51
52 self::$instance[$typeId] = $manager;
53 }
54 return self::$instance[$typeId];
55 }
56
57 static public function isSaleMode()
58 {
59 return true;
60 }
61
62 static public function isB24Mode()
63 {
64 return \CModule::IncludeModule('CRM');
65 }
66
67 static public function isSaleB24Mode()
68 {
69 return \Bitrix\Main\Config\Option::get("sale", "~IS_SALE_CRM_SITE_MASTER_FINISH", "N") == "Y";
70 }
71
72 static public function isB24SaleMode()
73 {
74 return \Bitrix\Main\Config\Option::get("sale", "~IS_SALE_BSM_SITE_MASTER_FINISH", "N")=="Y";
75 }
76
77 static public function getMode()
78 {
79 //B24 -> +BUS.wizard
81 {
82 return static::B24_SALE_MODE;
83 }
84 //BUS -> +B24.wizard
86 {
87 return static::SALE_B24_MODE;
88 }
90 {
91 return static::B24_MODE;
92 }
93 else
94 {
95 return static::SALE_MODE;
96 }
97 }
98
99 static public function isCRMCompatibility()
100 {
101 //B24 -> +BUS.wizard
102 if(static::getMode() == static::B24_SALE_MODE)
103 {
104 \CModule::IncludeModule('CRM');
105 return true;
106 }
107 //BUS -> +B24.wizard
108 elseif(static::getMode() == static::SALE_B24_MODE)
109 {
110 return false;
111 }
112 elseif(static::getMode() == static::B24_MODE)
113 {
114 \CModule::IncludeModule('CRM');
115 return true;
116 }
117
118 return false;
119 }
120}
static isCRMCompatibility()
Определения managerexport.php:99
static configure(ImportBase $entity)
Определения managerexport.php:27
static getDirectionType()
Определения managerexport.php:19
static registerInstance($typeId, ISettingsExport $settings)
Определения managerexport.php:42
$entity
$manager
Определения office365push.php:39
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
Определения prolog_main_admin.php:393
$config
Определения quickway.php:69