1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
entitydataprovider.php
См. документацию.
1
<?php
2
namespace
Bitrix\Main\Filter;
3
4
use Bitrix\HumanResources\Integration\UI\DepartmentProvider;
5
use Bitrix\Main;
6
7
abstract
class
EntityDataProvider
extends
DataProvider
8
{
15
protected
function
getFieldName
($fieldID)
16
{
17
throw
new
Main\NotImplementedException
(
'Method getFieldName must be overridden'
);
18
}
19
26
protected
function
createField
($fieldID,
array
$params
=
null
)
27
{
28
if
(!is_array(
$params
))
29
{
30
$params
= [];
31
}
32
33
if
(!isset(
$params
[
'name'
]))
34
{
35
$params
[
'name'
] = $this->
getFieldName
($fieldID);
36
}
37
38
return
new
Field
($this, $fieldID,
$params
);
39
}
40
41
protected
function
getUserEntitySelectorParams
(
string
$context
,
array
$params
):
array
42
{
43
$entities = [
44
[
45
'id'
=>
'user'
,
46
'options'
=> [
47
'inviteEmployeeLink'
=>
false
,
48
'intranetUsersOnly'
=>
true
,
49
]
50
],
51
];
52
53
$isEnableStructureNode =
Main\Loader::includeModule
(
'humanresources'
)
54
&& isset(
$params
[
'isEnableStructureNode'
])
55
&&
$params
[
'isEnableStructureNode'
] === true
56
;
57
if
($isEnableStructureNode)
58
{
59
$entities[] = [
60
'id'
=> DepartmentProvider::ENTITY_ID,
61
'options'
=> [
62
'selectMode'
=> DepartmentProvider::MODE_USERS_ONLY,
63
'allowFlatDepartments'
=>
true
,
64
],
65
];
66
}
67
68
if
(class_exists(\
Bitrix
\
Socialnetwork
\Integration\
UI
\EntitySelector\FiredUserProvider::class))
69
{
70
$entities[] = [
71
'id'
=>
'fired-user'
,
72
'options'
=> [
73
'inviteEmployeeLink'
=>
false
,
74
'intranetUsersOnly'
=>
true
,
75
'fieldName'
=>
$params
[
'fieldName'
],
76
'referenceClass'
=> (
$params
[
'referenceClass'
] ??
null
),
77
'referenceFieldName'
=> (
$params
[
'referenceFieldName'
] ??
null
),
78
'referenceAdditionalFilter'
=> (
$params
[
'referenceAdditionalFilter'
] ??
null
),
79
'entityTypeId'
=> (
$params
[
'entityTypeId'
] ??
null
),
80
'module'
=> (
$params
[
'module'
] ??
null
),
81
]
82
];
83
}
84
85
$isEnableAllUsers = isset(
$params
[
'isEnableAllUsers'
]) &&
$params
[
'isEnableAllUsers'
] ===
true
;
86
$isEnableOtherUsers = isset(
$params
[
'isEnableOtherUsers'
]) &&
$params
[
'isEnableOtherUsers'
] ===
true
;
87
88
if
($isEnableAllUsers || $isEnableOtherUsers)
89
{
90
$metaUser = [
91
'id'
=>
'meta-user'
,
92
'options'
=> [],
93
];
94
95
if
($isEnableAllUsers)
96
{
97
$metaUser[
'options'
][
'all-users'
] =
true
;
98
}
99
if
($isEnableOtherUsers)
100
{
101
$metaUser[
'options'
][
'other-users'
] =
true
;
102
}
103
104
$entities[] = $metaUser;
105
}
106
107
return
[
108
'params'
=> [
109
'multiple'
=>
'Y'
,
110
'dialogOptions'
=> [
111
'height'
=> 200,
112
'context'
=>
$context
,
113
'entities'
=> $entities,
114
'showAvatars'
=>
true
,
115
'dropdownMode'
=>
false
,
116
],
117
],
118
];
119
}
120
}
Bitrix\Main\Filter\DataProvider
Определения
dataprovider.php:5
Bitrix\Main\Filter\EntityDataProvider
Определения
entitydataprovider.php:8
Bitrix\Main\Filter\EntityDataProvider\getFieldName
getFieldName($fieldID)
Определения
entitydataprovider.php:15
Bitrix\Main\Filter\EntityDataProvider\getUserEntitySelectorParams
getUserEntitySelectorParams(string $context, array $params)
Определения
entitydataprovider.php:41
Bitrix\Main\Filter\EntityDataProvider\createField
createField($fieldID, array $params=null)
Определения
entitydataprovider.php:26
Bitrix\Main\Filter\Field
Определения
field.php:5
Bitrix\Main\Loader\includeModule
static includeModule($moduleName)
Определения
loader.php:67
Bitrix\Main\NotImplementedException
Определения
NotImplementedException.php:9
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$context
$context
Определения
csv_new_setup.php:223
Bitrix\Main\UI
Bitrix\Socialnetwork
Bitrix
$params
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
Определения
template.php:799
bitrix
modules
main
lib
filter
entitydataprovider.php
Создано системой
1.14.0