Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
companyresponsiblegroup.php
1
<?php
2
3
namespace
Bitrix\Sale\Internals
;
4
5
use
Bitrix\Main
;
6
7
24
class
CompanyResponsibleGroupTable
extends
Main\Entity\DataManager
25
{
26
public
static
function
getTableName
()
27
{
28
return
'b_sale_company_resp_grp'
;
29
}
30
31
public
static
function
getMap
()
32
{
33
return
array(
34
'ID'
=> array(
35
'data_type'
=>
'integer'
,
36
'primary'
=>
true
37
),
38
'COMPANY_ID'
=> array(
39
'data_type'
=>
'integer'
,
40
),
41
'GROUP_ID'
=> array(
42
'data_type'
=>
'integer'
,
43
'required'
=>
true
44
),
45
);
46
}
47
48
public
static
function
deleteByCompanyId
($id)
49
{
50
$id = intval($id);
51
if
($id <= 0)
52
throw
new
Main\ArgumentNullException
(
"id"
);
53
54
$itemsList = static::getList(
55
array(
56
"filter"
=> array(
"COMPANY_ID"
=> $id),
57
"select"
=> array(
"ID"
)
58
)
59
);
60
while
($item = $itemsList->fetch())
61
static::delete($item[
"ID"
]);
62
}
63
64
65
public
static
function
getCompanyGroups
($id)
66
{
67
$list = array();
68
$res = static::getList(array(
69
'filter'
=> array(
70
'=COMPANY_ID'
=> $id
71
),
72
'select'
=> array(
'GROUP_ID'
)
73
));
74
while
($data = $res->fetch())
75
{
76
$list[] = $data[
'GROUP_ID'
];
77
}
78
79
return
$list;
80
}
81
}
Bitrix\Main\ArgumentNullException
Definition
exception.php:54
Bitrix\Sale\Internals\CompanyResponsibleGroupTable
Definition
companyresponsiblegroup.php:25
Bitrix\Sale\Internals\CompanyResponsibleGroupTable\getMap
static getMap()
Definition
companyresponsiblegroup.php:31
Bitrix\Sale\Internals\CompanyResponsibleGroupTable\getCompanyGroups
static getCompanyGroups($id)
Definition
companyresponsiblegroup.php:65
Bitrix\Sale\Internals\CompanyResponsibleGroupTable\deleteByCompanyId
static deleteByCompanyId($id)
Definition
companyresponsiblegroup.php:48
Bitrix\Sale\Internals\CompanyResponsibleGroupTable\getTableName
static getTableName()
Definition
companyresponsiblegroup.php:26
Bitrix\Main
Bitrix\Sale\Internals
Definition
accountnumber.php:3
modules
sale
lib
internals
companyresponsiblegroup.php
Создано системой
1.10.0