Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
businessvalue_persondomain.php
1
<?php
2
3
namespace
Bitrix\Sale\Internals
;
4
5
use
Bitrix\Main
;
6
23
class
BusinessValuePersonDomainTable
extends
Main\Entity\DataManager
24
{
25
public
static
function
getFilePath
()
26
{
27
return
__FILE__;
28
}
29
30
public
static
function
getTableName
()
31
{
32
return
'b_sale_bizval_persondomain'
;
33
}
34
35
public
static
function
getMap
()
36
{
37
return
array(
38
new
Main\
Entity
\
IntegerField
(
'PERSON_TYPE_ID'
, array(
'primary'
=>
true
)),
39
new
Main\
Entity
\
StringField
(
'DOMAIN'
, array(
'primary'
=>
true
,
'size'
=> 1)),
40
41
new
Main\
Entity
\ReferenceField(
'PERSON_TYPE_REFERENCE'
,
'Bitrix\Sale\Internals\PersonTypeTable'
,
42
array(
'=this.PERSON_TYPE_ID'
=>
'ref.ID'
),
43
array(
'join_type'
=>
'INNER'
)
44
),
45
);
46
}
47
48
public
static
function
deleteByPersonTypeId
(
int
$personTypeId) : Main\ORM\Data\
DeleteResult
49
{
50
$result =
new
Main\ORM\Data\DeleteResult
();
51
52
$dbRes = static::getList([
53
'select'
=> [
'PERSON_TYPE_ID'
,
'DOMAIN'
],
54
'filter'
=> [
55
'=PERSON_TYPE_ID'
=> $personTypeId
56
]
57
]);
58
59
while
($item = $dbRes->fetch())
60
{
61
$r = static::delete([
62
'PERSON_TYPE_ID'
=> $item[
'PERSON_TYPE_ID'
],
63
'DOMAIN'
=> $item[
'DOMAIN'
],
64
]);
65
66
if
(!$r->isSuccess())
67
{
68
$result->addErrors($r->getErrors());
69
}
70
}
71
72
return
$result;
73
}
74
}
Bitrix\Catalog\Model\Entity
Definition
entity.php:12
Bitrix\Main\ORM\Data\DeleteResult
Definition
deleteresult.php:12
Bitrix\Main\ORM\Fields\IntegerField
Definition
integerfield.php:20
Bitrix\Main\ORM\Fields\StringField
Definition
stringfield.php:20
Bitrix\Sale\Internals\BusinessValuePersonDomainTable
Definition
businessvalue_persondomain.php:24
Bitrix\Sale\Internals\BusinessValuePersonDomainTable\deleteByPersonTypeId
static deleteByPersonTypeId(int $personTypeId)
Definition
businessvalue_persondomain.php:48
Bitrix\Sale\Internals\BusinessValuePersonDomainTable\getMap
static getMap()
Definition
businessvalue_persondomain.php:35
Bitrix\Sale\Internals\BusinessValuePersonDomainTable\getFilePath
static getFilePath()
Definition
businessvalue_persondomain.php:25
Bitrix\Sale\Internals\BusinessValuePersonDomainTable\getTableName
static getTableName()
Definition
businessvalue_persondomain.php:30
Bitrix\Main
Bitrix\Sale\Internals
Definition
accountnumber.php:3
modules
sale
lib
internals
businessvalue_persondomain.php
Создано системой
1.10.0