Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
entitytype.php
1
<?php
2
3
4
namespace
Bitrix\Sale\Exchange\Integration
;
5
6
7
use
Bitrix\Main\Localization\Loc
;
8
9
class
EntityType
10
{
11
const
UNDEFINED
= 0;
12
const
ORDER
= 1;
13
const
USER
= 2;
14
15
private
static
$ALL_DESCRIPTIONS = array();
16
17
public
static
function
getDescription
($typeId)
18
{
19
$typeId = intval($typeId);
20
$all = self::getAllDescriptions();
21
return
isset($all[$typeId]) ? $all[$typeId] :
''
;
22
}
23
24
public
static
function
getAllDescriptions
()
25
{
26
if
(!self::$ALL_DESCRIPTIONS[LANGUAGE_ID])
27
{
28
Loc::loadLanguageFile
(__FILE__);
29
30
self::$ALL_DESCRIPTIONS[LANGUAGE_ID] = array(
31
self::ORDER =>
Loc::getMessage
(
'SALE_INTEGRATION_ORDER_TYPE'
),
32
self::USER =>
Loc::getMessage
(
'SALE_INTEGRATION_USER_TYPE'
),
33
);
34
}
35
36
return
self::$ALL_DESCRIPTIONS[LANGUAGE_ID];
37
}
38
}
Bitrix\Main\Localization\Loc
Definition
loc.php:11
Bitrix\Main\Localization\Loc\loadLanguageFile
static loadLanguageFile($file, $language=null, $normalize=true)
Definition
loc.php:224
Bitrix\Main\Localization\Loc\getMessage
static getMessage($code, $replace=null, $language=null)
Definition
loc.php:29
Bitrix\Sale\Exchange\Integration\CRM\EntityType
Definition
entitytype.php:5
Bitrix\Sale\Exchange\Integration\CRM\EntityType\ORDER
const ORDER
Definition
entitytype.php:11
Bitrix\Sale\Exchange\Integration\CRM\EntityType\UNDEFINED
const UNDEFINED
Definition
entitytype.php:6
Bitrix\Sale\Exchange\Integration\EntityType\USER
const USER
Definition
entitytype.php:13
Bitrix\Sale\Exchange\Integration\EntityType\getDescription
static getDescription($typeId)
Definition
entitytype.php:17
Bitrix\Sale\Exchange\Integration\EntityType\getAllDescriptions
static getAllDescriptions()
Definition
entitytype.php:24
Bitrix\Sale\Exchange\Integration
modules
sale
lib
exchange
integration
entitytype.php
Создано системой
1.10.0