Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
employee.php
1<?php
9
12
14{
15 public static function onEmployeeDepartmentsChanged(Event $event)
16 {
17 global $CACHE_MANAGER;
18
19 $result = new EventResult(
20 EventResult::UNDEFINED,
21 array(),
22 'socialnetwork'
23 );
24
25 $oldDepartmentList = $event->getParameter('oldDepartmentList');
26 $newDepartmentList = $event->getParameter('newDepartmentList');
27
28 if (
29 !is_array($oldDepartmentList)
30 || !is_array($newDepartmentList)
31 )
32 {
33 return $result;
34 }
35
36 $oldExtranet = (empty($oldDepartmentList) || empty($oldDepartmentList[0]));
37 $newExtranet = (empty($newDepartmentList) || empty($newDepartmentList[0]));
38
39 if (
40 defined("BX_COMP_MANAGED_CACHE")
41 && (
42 ($oldExtranet && !$newExtranet)
43 || (!$oldExtranet && $newExtranet)
44 )
45 )
46 {
47 $CACHE_MANAGER->clearByTag("sonet_extranet_user_list");
48 }
49
50 $result = new EventResult(
51 EventResult::SUCCESS,
52 array(),
53 'socialnetwork'
54 );
55
56 return $result;
57 }
58}
59?>
getParameter($key)
Definition event.php:80