Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
userdevicetable.php
1
<?php
9
namespace
Bitrix\Main\Authentication\Internal
;
10
11
use
Bitrix\Main
;
12
use
Bitrix\Main\ORM\Data
;
13
use
Bitrix\Main\ORM\Fields
;
14
31
class
UserDeviceTable
extends
Data\DataManager
32
{
33
use Data\Internal\DeleteByFilterTrait;
34
35
public
static
function
getTableName
()
36
{
37
return
'b_user_device'
;
38
}
39
40
public
static
function
getMap
()
41
{
42
return
[
43
(
new
Fields\IntegerField(
'ID'
))
44
->configurePrimary(
true
)
45
->configureAutocomplete(
true
),
46
47
(
new
Fields\IntegerField(
'USER_ID'
))
48
->addValidator(
new
Fields\Validators\ForeignValidator(Main\
UserTable::getEntity
()->getField(
'ID'
))),
49
50
(
new
Fields\
StringField
(
'DEVICE_UID'
)),
51
52
(
new
Fields\
IntegerField
(
'DEVICE_TYPE'
)),
53
54
(
new
Fields\
StringField
(
'BROWSER'
)),
55
56
(
new
Fields\
StringField
(
'PLATFORM'
)),
57
58
(
new
Fields\
TextField
(
'USER_AGENT'
)),
59
60
(
new
Fields\
BooleanField
(
'COOKABLE'
))
61
->configureValues(
'N'
,
'Y'
)
62
->configureDefaultValue(
'N'
),
63
];
64
}
65
66
public
static
function
onDelete
(\
Bitrix
\Main\ORM\
Event
$event)
67
{
68
$id = $event->getParameter(
'id'
);
69
70
UserDeviceLoginTable::deleteByFilter([
'=DEVICE_ID'
=> $id]);
71
}
72
73
protected
static
function
onBeforeDeleteByFilter
(
string
$where)
74
{
75
UserDeviceLoginTable::deleteByDeviceFilter
($where);
76
}
77
}
Bitrix\Main\Authentication\Internal\UserDeviceLoginTable\deleteByDeviceFilter
static deleteByDeviceFilter($where)
Definition
userdevicelogintable.php:74
Bitrix\Main\Authentication\Internal\UserDeviceTable
Definition
userdevicetable.php:32
Bitrix\Main\Authentication\Internal\UserDeviceTable\getMap
static getMap()
Definition
userdevicetable.php:40
Bitrix\Main\Authentication\Internal\UserDeviceTable\onDelete
static onDelete(\Bitrix\Main\ORM\Event $event)
Definition
userdevicetable.php:66
Bitrix\Main\Authentication\Internal\UserDeviceTable\getTableName
static getTableName()
Definition
userdevicetable.php:35
Bitrix\Main\Authentication\Internal\UserDeviceTable\onBeforeDeleteByFilter
static onBeforeDeleteByFilter(string $where)
Definition
userdevicetable.php:73
Bitrix\Main\Event
Definition
event.php:5
Bitrix\Main\ORM\Data\DataManager
Definition
datamanager.php:33
Bitrix\Main\ORM\Data\DataManager\getEntity
static getEntity()
Definition
datamanager.php:78
Bitrix\Main\ORM\Fields\BooleanField
Definition
booleanfield.php:20
Bitrix\Main\ORM\Fields\IntegerField
Definition
integerfield.php:20
Bitrix\Main\ORM\Fields\StringField
Definition
stringfield.php:20
Bitrix\Main\ORM\Fields\TextField
Definition
textfield.php:20
Bitrix\Main\Authentication\Internal
Definition
groupsubordinatetable.php:10
Bitrix\Main\ORM\Data
Definition
addresult.php:9
Bitrix\Main\ORM\Fields
Definition
arrayfield.php:9
Bitrix\Main
Bitrix
modules
main
lib
authentication
internal
userdevicetable.php
Создано системой
1.10.0