Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
pathlang.php
1<?php
2
4
8
34{
35 use Index\Internals\BulkOperation;
36
42 public static function getTableName(): string
43 {
44 return 'b_translate_path_lang';
45 }
46
52 public static function getMap(): array
53 {
54 return [
55 'ID' => [
56 'data_type' => 'integer',
57 'primary' => true,
58 'autocomplete' => true,
59 ],
60 'PATH' => [
61 'data_type' => 'string',
62 ],
63 ];
64 }
65
73 public static function purge(?Translate\Filter $filter = null): void
74 {
75 $relPath = isset($filter, $filter->path) ? $filter->path : '';
76
77 if (!empty($relPath))
78 {
79 $relPath = rtrim($relPath, '/');
80
81 static::bulkDelete(['=%PATH' => $relPath .'%']);
82 }
83 else
84 {
85 static::bulkDelete();
86 }
87 }
88}
static purge(?Translate\Filter $filter=null)
Definition pathlang.php:73