1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
vendornotificationsigntable.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Main\Security\Notifications
;
4
5
use
Bitrix\Main\ORM\Data\DataManager
;
6
use
Bitrix\Main\ORM\Fields\DatetimeField
;
7
use
Bitrix\Main\ORM\Fields\IntegerField
;
8
use
Bitrix\Main\ORM\Fields\StringField
;
9
use
Bitrix\Main\Type\DateTime
;
10
27
class
VendorNotificationSignTable
extends
DataManager
28
{
29
public
static
function
getTableName
()
30
{
31
return
'b_sec_vendor_notification_sign'
;
32
}
33
34
public
static
function
getMap
()
35
{
36
return
[
37
(
new
IntegerField
(
'ID'
))
38
->configurePrimary()
39
->configureAutocomplete(),
40
(
new
IntegerField
(
'USER_ID'
)),
41
(
new
StringField
(
'NOTIFICATION_VENDOR_ID'
)),
42
(
new
DatetimeField
(
'DATE'
))
43
];
44
}
45
46
public
static
function
signOrIgnore
($notificationId,
$userId
)
47
{
48
$tableName = static::getTableName();
49
$connection
= static::getEntity()->getConnection();
50
$sqlHelper =
$connection
->getSqlHelper();
51
52
[
$fields
, $values] = $sqlHelper->prepareInsert($tableName, [
53
'USER_ID'
=>
$userId
,
54
'NOTIFICATION_VENDOR_ID'
=> $notificationId,
55
'DATE'
=>
new
DateTime
56
]);
57
58
$query
= $sqlHelper->getInsertIgnore($tableName,
"($fields)"
,
"VALUES($values)"
);
59
60
$connection
->query(
$query
);
61
}
62
}
$connection
$connection
Определения
actionsdefinitions.php:38
$userId
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения
check_mail.php:18
Bitrix\Main\ORM\Data\DataManager
Определения
datamanager.php:35
Bitrix\Main\ORM\Fields\DatetimeField
Определения
datetimefield.php:22
Bitrix\Main\ORM\Fields\IntegerField
Определения
integerfield.php:20
Bitrix\Main\ORM\Fields\StringField
Определения
stringfield.php:20
Bitrix\Main\Security\Notifications\VendorNotificationSignTable
Определения
vendornotificationsigntable.php:28
Bitrix\Main\Security\Notifications\VendorNotificationSignTable\signOrIgnore
static signOrIgnore($notificationId, $userId)
Определения
vendornotificationsigntable.php:46
Bitrix\Main\Security\Notifications\VendorNotificationSignTable\getMap
static getMap()
Определения
vendornotificationsigntable.php:34
Bitrix\Main\Security\Notifications\VendorNotificationSignTable\getTableName
static getTableName()
Определения
vendornotificationsigntable.php:29
Bitrix\Main\Type\DateTime
Определения
datetime.php:9
$query
$query
Определения
get_search.php:11
Bitrix\Main\Security\Notifications
Определения
vendornotificationsigntable.php:3
$fields
$fields
Определения
yandex_run.php:501
bitrix
modules
main
lib
security
notifications
vendornotificationsigntable.php
Создано системой
1.14.0