1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
deletebyfiltertrait.php
См. документацию.
1<?php
2
9
11
12use Bitrix\Main;
14
15trait DeleteByFilterTrait
16{
22 public static function deleteByFilter(array $filter)
23 {
24 $entity = static::getEntity();
25 $table = static::getTableName();
26
28
29 if($where <> '')
30 {
31 $where = ' where ' . $where;
32 }
33 else
34 {
35 throw new Main\ArgumentException("Deleting by empty filter is not allowed, use truncate ({$table}).", 'filter');
36 }
37
38 static::onBeforeDeleteByFilter($where);
39
40 $entity->getConnection()->queryExecute("delete from {$table} {$where}");
41
42 static::cleanCache();
43 }
44
45 protected static function onBeforeDeleteByFilter(string $where)
46 {
47 // may be implemented in a class that uses the trait
48 }
49}
static buildFilterSql(Entity $entity, $filter)
Определения query.php:3913
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$entity
$filter
Определения iblock_catalog_list.php:54
Определения chain.php:3
$table
Определения mysql_to_pgsql.php:36