1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
bitrix24event.php
См. документацию.
1
<?php
8
namespace
Bitrix\Socialnetwork\Integration\Bitrix24
;
9
10
use Bitrix\Socialnetwork\Livefeed\Provider;
11
use
Bitrix\Main\Event
;
12
use
Bitrix\Main\EventResult
;
13
14
class
Bitrix24Event
15
{
16
public
static
function
OnManualModuleAddDelete
(
Event
$event
)
17
{
18
$result
=
new
EventResult
(
19
EventResult::UNDEFINED,
20
array
(),
21
'socialnetwork'
22
);
23
24
$modulesList =
$event
->getParameter(
'modulesList'
);
25
26
if
(
27
!is_array($modulesList)
28
|| empty($modulesList)
29
)
30
{
31
return
$result
;
32
}
33
34
$connection
=
\Bitrix\Main\HttpApplication::getConnection
();
35
36
foreach
($modulesList as
$moduleId
=>
$status
)
37
{
38
if
(!in_array(
$status
, [
'Y'
,
'N'
]))
39
{
40
continue
;
41
}
42
43
$inactive = (
44
$status
==
'N'
45
?
'Y'
46
:
'N'
47
);
48
49
switch
(
$moduleId
)
50
{
51
case
"crm"
:
52
$sql =
"UPDATE b_sonet_log SET INACTIVE='"
.$inactive.
"' WHERE MODULE_ID in ('crm', 'crm_shared')"
;
53
break
;
54
case
"timeman"
:
55
$sql =
"UPDATE b_sonet_log SET INACTIVE='"
.$inactive.
"' WHERE EVENT_ID in ('timeman_entry', 'report')"
;
56
break
;
57
case
"lists"
:
58
$sql =
"UPDATE b_sonet_log SET INACTIVE='"
.$inactive.
"' WHERE EVENT_ID = 'lists_new_element'"
;
59
break
;
60
default
:
61
$sql =
''
;
62
}
63
if
(!empty($sql))
64
{
65
$connection
->query($sql);
66
}
67
}
68
69
$result
=
new
EventResult
(
70
EventResult::SUCCESS,
71
array
(),
72
'socialnetwork'
73
);
74
75
return
$result
;
76
}
77
}
78
?>
$connection
$connection
Определения
actionsdefinitions.php:38
Bitrix\Main\Application\getConnection
static getConnection($name="")
Определения
application.php:638
Bitrix\Main\Event
Определения
event.php:5
Bitrix\Main\EventResult
Определения
eventresult.php:5
Bitrix\Socialnetwork\Integration\Bitrix24\Bitrix24Event
Определения
bitrix24event.php:15
Bitrix\Socialnetwork\Integration\Bitrix24\Bitrix24Event\OnManualModuleAddDelete
static OnManualModuleAddDelete(Event $event)
Определения
bitrix24event.php:16
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
$moduleId
$moduleId
Определения
group_bizproc_workflow_delete.php:16
$status
$status
Определения
session.php:10
Bitrix\Socialnetwork\Integration\Bitrix24
Определения
bitrix24event.php:8
$event
$event
Определения
prolog_after.php:141
bitrix
modules
socialnetwork
lib
integration
bitrix24
bitrix24event.php
Создано системой
1.14.0