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