Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
groupcontact.php
1
<?php
8
namespace
Bitrix\Sender\Internals\Model
;
9
10
use
Bitrix\Main\Entity
;
11
use
Bitrix\Main\Localization\Loc
;
12
use
Bitrix\Sender
;
13
14
Loc::loadMessages
(__FILE__);
15
32
class
GroupContactTable
extends
Entity\DataManager
33
{
39
public
static
function
getTableName
()
40
{
41
return
'b_sender_group_contact'
;
42
}
43
49
public
static
function
getMap
()
50
{
51
return
array(
52
'ID'
=> array(
53
'data_type'
=>
'integer'
,
54
'autocomplete'
=>
true
,
55
'primary'
=>
true
,
56
),
57
'DATE_INSERT'
=> array(
58
'data_type'
=>
'datetime'
,
59
),
60
'CONTACT'
=> array(
61
'data_type'
=> Sender\ContactTable::class,
62
'reference'
=> array(
'=this.CONTACT_ID'
=>
'ref.ID'
),
63
),
64
'CONTACT_ID'
=> array(
65
'required'
=>
true
,
66
'data_type'
=>
'integer'
,
67
),
68
'GROUP_ID'
=> array(
69
'data_type'
=>
'integer'
,
70
'required'
=>
true
,
71
'primary'
=>
true
,
72
),
73
'TYPE_ID'
=> array(
74
'data_type'
=>
'integer'
,
75
'required'
=>
true
,
76
'primary'
=>
true
,
77
),
78
79
'CNT'
=> array(
80
'data_type'
=>
'integer'
,
81
'required'
=>
true
,
82
'default_value'
=> 0,
83
),
84
'GROUP'
=> array(
85
'data_type'
=>
'Bitrix\Sender\GroupTable'
,
86
'reference'
=> array(
'=this.GROUP_ID'
=>
'ref.ID'
),
87
),
88
);
89
}
90
97
public
static
function
deleteByGroupId
($groupId)
98
{
99
$items = static::getList([
100
'select'
=> [
'ID'
,
'GROUP_ID'
,
'TYPE_ID'
],
101
'filter'
=> [
'=GROUP_ID'
=> $groupId]
102
]);
103
foreach
($items as $primary)
104
{
105
$result = static::delete($primary);
106
if
(!$result->isSuccess())
107
{
108
return
false
;
109
}
110
}
111
112
return
true
;
113
}
114
}
Bitrix\Main\Localization\Loc
Definition
loc.php:11
Bitrix\Main\Localization\Loc\loadMessages
static loadMessages($file)
Definition
loc.php:64
Bitrix\Main\ORM\Entity
Definition
entity.php:26
Bitrix\Sender\Internals\Model\GroupContactTable
Definition
groupcontact.php:33
Bitrix\Sender\Internals\Model\GroupContactTable\getMap
static getMap()
Definition
groupcontact.php:49
Bitrix\Sender\Internals\Model\GroupContactTable\deleteByGroupId
static deleteByGroupId($groupId)
Definition
groupcontact.php:97
Bitrix\Sender\Internals\Model\GroupContactTable\getTableName
static getTableName()
Definition
groupcontact.php:39
Bitrix\Sender\Internals\Model
Definition
abuse.php:3
Bitrix\Sender
modules
sender
lib
internals
model
groupcontact.php
Создано системой
1.10.0