Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
usergrouprestriction.php
1
<?php
2
3
namespace
Bitrix\Sale\Internals
;
4
5
use
Bitrix\Main
,
6
Bitrix\Main\Localization\Loc
;
7
8
Loc::loadMessages
(__FILE__);
9
37
class
UserGroupRestrictionTable
extends
Main\ORM\Data\DataManager
38
{
39
const
ENTITY_TYPE_SHIPMENT
= 1;
40
const
ENTITY_TYPE_PAYMENT
= 2;
41
47
public
static
function
getTableName
()
48
{
49
return
'b_sale_usergroup_restr'
;
50
}
51
57
public
static
function
getMap
()
58
{
59
return
[
60
new
Main\ORM\Fields\IntegerField
(
'ID'
,[
61
'primary'
=>
true
,
62
'autocomplete'
=>
true
63
]),
64
65
new
Main\ORM\Fields\IntegerField
(
'ENTITY_ID'
, [
66
'required'
=>
true
67
]),
68
69
new
Main\ORM\Fields\IntegerField
(
'ENTITY_TYPE_ID'
, [
70
'required'
=>
true
71
]),
72
73
new
Main\ORM\Fields\IntegerField
(
'GROUP_ID'
, [
74
'required'
=>
true
75
])
76
];
77
}
78
79
public
static
function
deleteByEntity
($entityType, $entityId)
80
{
81
$conn = Main\Application::getConnection();
82
$helper = $conn->getSqlHelper();
83
$conn->queryExecute(
'DELETE FROM '
.$helper->quote(self::getTableName()).
' WHERE ENTITY_TYPE_ID='
.(
string
)(
int
)$entityType.
' AND ENTITY_ID='
.(
string
)(
int
)$entityId);
84
}
85
}
Bitrix\Main\Localization\Loc
Definition
loc.php:11
Bitrix\Main\Localization\Loc\loadMessages
static loadMessages($file)
Definition
loc.php:64
Bitrix\Main\ORM\Data\DataManager
Definition
datamanager.php:33
Bitrix\Main\ORM\Fields\IntegerField
Definition
integerfield.php:20
Bitrix\Sale\Internals\UserGroupRestrictionTable
Definition
usergrouprestriction.php:38
Bitrix\Sale\Internals\UserGroupRestrictionTable\getMap
static getMap()
Definition
usergrouprestriction.php:57
Bitrix\Sale\Internals\UserGroupRestrictionTable\ENTITY_TYPE_SHIPMENT
const ENTITY_TYPE_SHIPMENT
Definition
usergrouprestriction.php:39
Bitrix\Sale\Internals\UserGroupRestrictionTable\deleteByEntity
static deleteByEntity($entityType, $entityId)
Definition
usergrouprestriction.php:79
Bitrix\Sale\Internals\UserGroupRestrictionTable\ENTITY_TYPE_PAYMENT
const ENTITY_TYPE_PAYMENT
Definition
usergrouprestriction.php:40
Bitrix\Sale\Internals\UserGroupRestrictionTable\getTableName
static getTableName()
Definition
usergrouprestriction.php:47
Bitrix\Main
Bitrix\Sale\Internals
Definition
accountnumber.php:3
modules
sale
lib
internals
usergrouprestriction.php
Создано системой
1.10.0