Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
workgroup.php
1
<?php
2
3
namespace
Bitrix\Socialnetwork\Controller\Filter
;
4
5
use \Bitrix\Socialnetwork\Helper;
6
7
class
Workgroup
extends
\Bitrix\Main\Controller\Filter\Base
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
Bitrix\Main\Controller\Filter\Base
Definition
base.php:9
Bitrix\Main\Controller\Filter\Base\getList
getList($entityTypeId, array $filterSettingsParams, ?array $additionalParams=null)
Definition
base.php:10
Bitrix\Main\Controller\Filter\Base\getField
getField($entityTypeId, array $filterSettingsParams, $id, ?array $additionalParams=null)
Definition
base.php:29
Bitrix\Socialnetwork\Controller\Filter\Workgroup
Definition
workgroup.php:8
Bitrix\Socialnetwork\Controller\Filter\Workgroup\getListAction
getListAction($filterId, $componentName, $signedParameters)
Definition
workgroup.php:9
Bitrix\Socialnetwork\Controller\Filter\Workgroup\getFieldAction
getFieldAction($filterId, $id, $componentName, $signedParameters)
Definition
workgroup.php:35
Bitrix\Socialnetwork\WorkgroupTable\getUfId
static getUfId()
Definition
workgroup.php:47
Bitrix\Socialnetwork\Controller\Filter
Definition
usertogroup.php:3
Bitrix
modules
socialnetwork
lib
controller
filter
workgroup.php
Создано системой
1.10.0