1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
companygroup.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Sale\Internals;
4
5
use Bitrix\Main;
6
7
24
class
CompanyGroupTable
extends
Main\Entity\DataManager
25
{
26
public
static
function
getTableName
()
27
{
28
return
'b_sale_company_group'
;
29
}
30
31
public
static
function
getMap
()
32
{
33
return
[
34
'ID'
=> [
35
'data_type'
=>
'integer'
,
36
'primary'
=>
true
,
37
'autocomplete'
=>
true
,
38
],
39
'COMPANY_ID'
=> [
40
'data_type'
=>
'integer'
,
41
],
42
'GROUP_ID'
=> [
43
'data_type'
=>
'integer'
,
44
'required'
=>
true
,
45
],
46
];
47
}
48
49
public
static
function
deleteByCompanyId
($id)
50
{
51
$id = intval($id);
52
if
($id <= 0)
53
{
54
throw
new
Main\ArgumentNullException
(
'id'
);
55
}
56
57
$itemsList = static::getList(
58
[
59
'filter'
=> [
'COMPANY_ID'
=> $id],
60
'select'
=> [
'ID'
],
61
]
62
);
63
while
($item = $itemsList->fetch())
64
{
65
static::delete($item[
'ID'
]);
66
}
67
}
68
}
Bitrix\Main\ArgumentNullException
Определения
ArgumentNullException.php:9
Bitrix\Sale\Internals\CompanyGroupTable
Определения
companygroup.php:25
Bitrix\Sale\Internals\CompanyGroupTable\getMap
static getMap()
Определения
companygroup.php:31
Bitrix\Sale\Internals\CompanyGroupTable\deleteByCompanyId
static deleteByCompanyId($id)
Определения
companygroup.php:49
Bitrix\Sale\Internals\CompanyGroupTable\getTableName
static getTableName()
Определения
companygroup.php:26
bitrix
modules
sale
lib
internals
companygroup.php
Создано системой
1.14.0