Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
workgroup.php
1<?php
2
4
5use \Bitrix\Socialnetwork\Helper;
6
8{
9 public function getListAction($filterId, $componentName, $signedParameters)
10 {
11 $filterId = trim($filterId);
12 $unsignedParameters = \Bitrix\Main\Component\ParameterSigner::unsignParameters($componentName, $signedParameters);
13
14 $additionalParameters = null;
15 if (
16 is_array($unsignedParameters)
17 && isset($unsignedParameters['MODE'])
18 )
19 {
20 $additionalParameters = [
21 'MODE' => $unsignedParameters['MODE'],
22 'CONTEXT_USER_ID' => ($unsignedParameters['USER_ID'] ?: Helper\User::getCurrentUserId()),
23 ];
24 }
25
26 $result = $this->getList(
27 \Bitrix\Socialnetwork\WorkgroupTable::getUfId(),
28 [ 'ID' => $filterId !== '' ? $filterId : 'SOCIALNETWORK_WORKGROUP_LIST' ],
29 $additionalParameters,
30 );
31
32 return $result;
33 }
34
35 public function getFieldAction($filterId, $id, $componentName, $signedParameters)
36 {
37 $filterId = trim($filterId);
38 $id = trim($id);
39 $unsignedParameters = \Bitrix\Main\Component\ParameterSigner::unsignParameters($componentName, $signedParameters);
40
41 $additionalParameters = null;
42 if (
43 is_array($unsignedParameters)
44 && isset($unsignedParameters['MODE'])
45 )
46 {
47 $additionalParameters = [
48 'MODE' => $unsignedParameters['MODE'],
49 'CONTEXT_USER_ID' => ($unsignedParameters['USER_ID'] ?: Helper\User::getCurrentUserId()),
50 ];
51 }
52
53 return $this->getField(
54 \Bitrix\Socialnetwork\WorkgroupTable::getUfId(),
55 [ 'ID' => $filterId !== '' ? $filterId : 'SOCIALNETWORK_WORKGROUP_LIST' ],
56 $id,
57 $additionalParameters
58 );
59 }
60}
61
getList($entityTypeId, array $filterSettingsParams, ?array $additionalParams=null)
Definition base.php:10
getField($entityTypeId, array $filterSettingsParams, $id, ?array $additionalParams=null)
Definition base.php:29
getListAction($filterId, $componentName, $signedParameters)
Definition workgroup.php:9
getFieldAction($filterId, $id, $componentName, $signedParameters)
Definition workgroup.php:35