Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
grouplocation.php
1
<?php
8
namespace
Bitrix\Sale\Location
;
9
26
class
GroupLocationTable
extends
Connector
27
{
28
public
static
function
getFilePath
()
29
{
30
return
__FILE__;
31
}
32
33
public
static
function
getTableName
()
34
{
35
return
'b_sale_location2location_group'
;
36
}
37
38
public
static
function
getTypeField
()
39
{
40
return
''
;
41
}
42
43
public
static
function
getLinkField
()
44
{
45
return
'LOCATION_GROUP_ID'
;
46
}
47
48
public
static
function
getTargetEntityName
()
49
{
50
return
'Bitrix\Sale\Location\Group'
;
51
}
52
53
public
static
function
getUseGroups
()
54
{
55
return
false
;
56
}
57
58
public
static
function
getMap
()
59
{
60
return
array(
61
62
'LOCATION_ID'
=> array(
63
'data_type'
=>
'integer'
,
64
'primary'
=>
true
,
65
'required'
=>
true
66
),
67
68
'LOCATION_GROUP_ID'
=> array(
69
'data_type'
=>
'integer'
,
70
'primary'
=>
true
,
71
'required'
=>
true
72
),
73
74
// alias
75
'GROUP_ID'
=> array(
76
'data_type'
=>
'integer'
,
77
'expression'
=> array(
78
'%u'
,
79
'LOCATION_GROUP_ID'
80
)
81
),
82
83
// virtual
84
'LOCATION'
=> array(
85
'data_type'
=>
'\Bitrix\Sale\Location\Location'
,
86
'reference'
=> array(
87
'=this.LOCATION_ID'
=>
'ref.ID'
88
)
89
),
90
91
// alias
92
'GROUP'
=> array(
93
'data_type'
=>
'\Bitrix\Sale\Location\Group'
,
94
'reference'
=> array(
95
'=this.LOCATION_GROUP_ID'
=>
'ref.ID'
96
)
97
),
98
);
99
}
100
101
public
static
function
deleteByGroupId
($groupId)
102
{
103
if
(intval($groupId) <= 0)
104
return
;
105
106
$con = \Bitrix\Main\Application::getConnection();
107
$con->queryExecute(
"DELETE FROM "
.self::getTableName().
" WHERE LOCATION_GROUP_ID="
.intval($groupId));
108
}
109
}
Bitrix\Sale\Location\Connector
Definition
connector.php:21
Bitrix\Sale\Location\GroupLocationTable
Definition
grouplocation.php:27
Bitrix\Sale\Location\GroupLocationTable\getMap
static getMap()
Definition
grouplocation.php:58
Bitrix\Sale\Location\GroupLocationTable\getLinkField
static getLinkField()
Definition
grouplocation.php:43
Bitrix\Sale\Location\GroupLocationTable\getTypeField
static getTypeField()
Definition
grouplocation.php:38
Bitrix\Sale\Location\GroupLocationTable\getFilePath
static getFilePath()
Definition
grouplocation.php:28
Bitrix\Sale\Location\GroupLocationTable\deleteByGroupId
static deleteByGroupId($groupId)
Definition
grouplocation.php:101
Bitrix\Sale\Location\GroupLocationTable\getTargetEntityName
static getTargetEntityName()
Definition
grouplocation.php:48
Bitrix\Sale\Location\GroupLocationTable\getUseGroups
static getUseGroups()
Definition
grouplocation.php:53
Bitrix\Sale\Location\GroupLocationTable\getTableName
static getTableName()
Definition
grouplocation.php:33
Bitrix\Sale\Location
modules
sale
lib
location
grouplocation.php
Создано системой
1.10.0