Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
whitelist.php
1<?php
2
3namespace Bitrix\Security;
4
6
23class WhiteListTable extends \Bitrix\Main\Entity\DataManager
24{
25 public static function getTableName()
26 {
27 return 'b_sec_white_list';
28 }
29
30 public static function getMap()
31 {
32 return [
33 (new \Bitrix\Main\Entity\IntegerField('ID'))
34 ->configurePrimary()
35 ->configureAutocomplete(),
36 (new \Bitrix\Main\Entity\StringField('WHITE_SUBSTR'))
37 ->configureSize(250)
38 ];
39 }
40
41 public static function getCollectionClass()
42 {
43 return WhiteLists::class;
44 }
45
46 public static function getObjectClass()
47 {
48 return WhiteList::class;
49 }
50
51 public static function deleteList(array $filter)
52 {
53 $entity = static::getEntity();
54 $connection = $entity->getConnection();
55
56 $where = Query::buildFilterSql($entity, $filter);
57 $where = $where ? 'WHERE ' . $where : '';
58
59 $sql = sprintf(
60 'DELETE FROM %s %s',
61 $connection->getSqlHelper()->quote($entity->getDbTableName()),
62 $where
63 );
64
65 $res = $connection->query($sql);
66
67 return $res;
68 }
69
70}
71
72class WhiteLists extends EO_WhiteList_Collection
73{
74}
75
76class WhiteList extends EO_WhiteList
77{
78}
static deleteList(array $filter)
Definition whitelist.php:51