1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
bot.php
См. документацию.
1
<?php
2
namespace
Bitrix\Im\Update
;
3
4
use
Bitrix\Im\V2\Integration\HumanResources\Department\Department
;
5
use
Bitrix\Main\Loader
;
6
7
class
Bot
8
{
9
public
static
function
removeDepartmentLinkAgent
()
10
{
11
if
(
12
!\
Bitrix
\
Main
\
ModuleManager::isModuleInstalled
(
'intranet'
)
13
|| !Loader::includeModule(
'iblock'
)
14
)
15
{
16
return
""
;
17
}
18
19
$result
=
\Bitrix\Main\UserTable::getList
([
20
'select'
=> [
'ID'
],
21
'filter'
=> [
22
'=EXTERNAL_AUTH_ID'
=> \
Bitrix
\
Im
\Bot::EXTERNAL_AUTH_ID,
23
'!UF_DEPARTMENT'
=>
false
24
]
25
]);
26
27
$user
= new \CUser;
28
while
($row =
$result
->fetch())
29
{
30
$user
->Update($row[
'ID'
], [
'UF_DEPARTMENT'
=> []]);
31
}
32
33
$botDepartments = Department::getInstance()->getListByXml(
'im_bot'
);
34
35
foreach
($botDepartments as $department)
36
{
37
if
($department->id !==
null
)
38
{
39
\CIBlockSection::Delete($department->id);
40
}
41
}
42
43
return
""
;
44
}
45
}
Bitrix\Im\Update\Bot\removeDepartmentLinkAgent
static removeDepartmentLinkAgent()
Определения
bot.php:9
Bitrix\Im\V2\Integration\HumanResources\Department\Department
Определения
Department.php:20
Bitrix\Main\Loader
Определения
loader.php:13
Bitrix\Main\ModuleManager\isModuleInstalled
static isModuleInstalled($moduleName)
Определения
modulemanager.php:125
Bitrix\Main\ORM\Data\DataManager\getList
static getList(array $parameters=array())
Определения
datamanager.php:431
$result
$result
Определения
get_property_values.php:14
Bitrix\Im\Bot
Определения
contextmenu.php:9
Bitrix\Im\Update
Определения
bot.php:2
Bitrix\Im
Bitrix\Main
Bitrix\Main\$user
$user
Определения
mysql_to_pgsql.php:33
Bitrix
bitrix
modules
im
lib
update
bot.php
Создано системой
1.14.0