Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
consent.php
1
<?php
8
namespace
Bitrix\Main\UserConsent\Internals
;
9
10
use
Bitrix\Main\Entity
;
11
use
Bitrix\Main\ORM\Fields\Relations\OneToMany
;
12
use
Bitrix\Main\Type\DateTime
;
13
use
Bitrix\Main\Localization\Loc
;
14
use Bitrix\Crm\WebForm\Helper;
15
16
Loc::loadMessages
(__FILE__);
17
34
class
ConsentTable
extends
Entity\DataManager
35
{
41
public
static
function
getTableName
()
42
{
43
return
'b_consent_user_consent'
;
44
}
45
52
public
static
function
getMap
()
53
{
54
return
array(
55
'ID'
=> array(
56
'data_type'
=>
'integer'
,
57
'primary'
=>
true
,
58
'autocomplete'
=>
true
,
59
),
60
'DATE_INSERT'
=> array(
61
'data_type'
=>
'datetime'
,
62
'required'
=>
true
,
63
'default_value'
=>
new
DateTime
(),
64
),
65
'AGREEMENT_ID'
=> array(
66
'data_type'
=>
'integer'
,
67
'required'
=>
true
,
68
),
69
'USER_ID'
=> array(
70
'data_type'
=>
'integer'
,
71
),
72
'IP'
=> array(
73
'data_type'
=>
'string'
,
74
'required'
=>
true
,
75
'validation'
=>
function
()
76
{
77
return
[
78
function
($value)
79
{
80
return
filter_var($value, FILTER_VALIDATE_IP) !==
false
;
81
}
82
];
83
}
84
),
85
'URL'
=> array(
86
'data_type'
=>
'string'
,
87
'required'
=>
false
,
88
),
89
'ORIGIN_ID'
=> array(
90
'data_type'
=>
'string'
,
91
'required'
=>
false
,
92
),
93
'ORIGINATOR_ID'
=> array(
94
'data_type'
=>
'string'
,
95
'required'
=>
false
,
96
),
97
'USER'
=> array(
98
'data_type'
=>
'Bitrix\Main\UserTable'
,
99
'reference'
=> array(
'=this.USER_ID'
=>
'ref.ID'
),
100
),
101
(
new
OneToMany
(
'ITEMS'
, UserConsentItemTable::class,
'USER_CONSENT'
))
102
);
103
}
104
}
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\Main\ORM\Fields\Relations\OneToMany
Definition
onetomany.php:23
Bitrix\Main\Type\DateTime
Definition
datetime.php:9
Bitrix\Main\UserConsent\Internals\ConsentTable
Definition
consent.php:35
Bitrix\Main\UserConsent\Internals\ConsentTable\getMap
static getMap()
Definition
consent.php:52
Bitrix\Main\UserConsent\Internals\ConsentTable\getTableName
static getTableName()
Definition
consent.php:41
Bitrix\Main\UserConsent\Internals
Definition
agreement.php:8
modules
main
lib
userconsent
internals
consent.php
Создано системой
1.10.0