1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
deletetsparamagent.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Im\Update;
4
5
use Bitrix\Im\Model\MessageParamTable;
6
use Bitrix\Main\Loader;
7
8
class
DeleteTsParamAgent
9
{
10
protected
static
$moduleId
=
'im'
;
11
private
const
LIMIT = 1000;
12
13
public
static
function
deleteTsParamAgent
()
14
{
15
if
(!Loader::includeModule(self::$moduleId))
16
{
17
return
''
;
18
}
19
20
$paramIds = self::getParamIds();
21
if
(empty($paramIds))
22
{
23
return
''
;
24
}
25
26
MessageParamTable::deleteBatch([
'ID'
=> $paramIds]);
27
28
return
__METHOD__ .
'();'
;
29
}
30
31
private
static
function
getParamIds():
array
32
{
33
if
(Loader::includeModule(
'bitrix24'
))
34
{
35
$limit = 100;
36
}
37
38
$result
= MessageParamTable::query()
39
->setSelect([
'ID'
])
40
->where(
'PARAM_NAME'
,
'TS'
)
41
->setLimit($limit ?? self::LIMIT)
42
->fetchAll()
43
;
44
45
if
(empty(
$result
))
46
{
47
return
[];
48
}
49
50
return
array_unique(array_map(
'intval'
, array_column(
$result
,
'ID'
)));
51
}
52
}
Bitrix\Im\Update\DeleteTsParamAgent
Определения
deletetsparamagent.php:9
Bitrix\Im\Update\DeleteTsParamAgent\deleteTsParamAgent
static deleteTsParamAgent()
Определения
deletetsparamagent.php:13
Bitrix\Im\Update\DeleteTsParamAgent\$moduleId
static $moduleId
Определения
deletetsparamagent.php:10
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$result
$result
Определения
get_property_values.php:14
bitrix
modules
im
lib
update
deletetsparamagent.php
Создано системой
1.14.0