Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
usergrouprestriction.php
1<?php
2
4
7
8Loc::loadMessages(__FILE__);
9
38{
41
47 public static function getTableName()
48 {
49 return 'b_sale_usergroup_restr';
50 }
51
57 public static function getMap()
58 {
59 return [
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}
static loadMessages($file)
Definition loc.php:64