Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
ListValuesProvider.php
1
<?php
2
3
namespace
Bitrix\Iblock\Integration\UI\Grid\Property\Type
;
4
5
use
Bitrix\Iblock\Integration\UI\Grid\General\BaseProvider
;
6
use
Bitrix\Main\Localization\Loc
;
7
11
final
class
ListValuesProvider
extends
BaseProvider
12
{
13
private
int
$propertyId;
14
18
public
function
__construct
(
int
$propertyId)
19
{
20
$this->propertyId = $propertyId;
21
}
22
26
public
function
getId
(): string
27
{
28
return
"iblock_property_{$this->propertyId}_list_values"
;
29
}
30
34
public
function
getColumns
(): array
35
{
36
return
[
37
[
38
'id'
=>
'ID'
,
39
'name'
=>
Loc::getMessage
(
'IBLOCK_UI_GRID_PROPERTY_LIST_VALUES_PROVIDER_ID'
),
40
'default'
=>
true
,
41
],
42
[
43
'id'
=>
'XML_ID'
,
44
'name'
=>
Loc::getMessage
(
'IBLOCK_UI_GRID_PROPERTY_LIST_VALUES_PROVIDER_XML_ID'
),
45
'default'
=>
true
,
46
'editable'
=>
true
,
47
],
48
[
49
'id'
=>
'VALUE'
,
50
'name'
=>
Loc::getMessage
(
'IBLOCK_UI_GRID_PROPERTY_LIST_VALUES_PROVIDER_VALUE'
),
51
'default'
=>
true
,
52
'editable'
=>
true
,
53
],
54
[
55
'id'
=>
'SORT'
,
56
'name'
=>
Loc::getMessage
(
'IBLOCK_UI_GRID_PROPERTY_LIST_VALUES_PROVIDER_SORT'
),
57
'default'
=>
true
,
58
'editable'
=>
true
,
59
'type'
=>
'number'
,
60
],
61
[
62
'id'
=>
'DEF'
,
63
'name'
=>
Loc::getMessage
(
'IBLOCK_UI_GRID_PROPERTY_LIST_VALUES_PROVIDER_DEF'
),
64
'default'
=>
true
,
65
'editable'
=>
true
,
66
'type'
=>
'checkbox'
,
67
],
68
];
69
}
70
74
protected
function
getActionPanel
(): ?array
75
{
76
return
null
;
77
}
78
82
public
function
toArray
(): array
83
{
84
$result = parent::toArray();
85
86
$result[
'SHOW_GRID_SETTINGS_MENU'
] =
false
;
87
88
return
$result;
89
}
90
94
protected
function
getTemplateRow
(): ?array
95
{
96
return
[
97
'data'
=> [
98
'SORT'
=> 500,
99
'DEF'
=>
'N'
,
100
],
101
];
102
}
103
}
Bitrix\Iblock\Integration\UI\Grid\General\BaseProvider
Definition
BaseProvider.php:15
Bitrix\Iblock\Integration\UI\Grid\Property\Type\ListValuesProvider
Definition
ListValuesProvider.php:12
Bitrix\Iblock\Integration\UI\Grid\Property\Type\ListValuesProvider\getId
getId()
Definition
ListValuesProvider.php:26
Bitrix\Iblock\Integration\UI\Grid\Property\Type\ListValuesProvider\getTemplateRow
getTemplateRow()
Definition
ListValuesProvider.php:94
Bitrix\Iblock\Integration\UI\Grid\Property\Type\ListValuesProvider\getColumns
getColumns()
Definition
ListValuesProvider.php:34
Bitrix\Iblock\Integration\UI\Grid\Property\Type\ListValuesProvider\toArray
toArray()
Definition
ListValuesProvider.php:82
Bitrix\Iblock\Integration\UI\Grid\Property\Type\ListValuesProvider\getActionPanel
getActionPanel()
Definition
ListValuesProvider.php:74
Bitrix\Iblock\Integration\UI\Grid\Property\Type\ListValuesProvider\__construct
__construct(int $propertyId)
Definition
ListValuesProvider.php:18
Bitrix\Main\Localization\Loc
Definition
loc.php:11
Bitrix\Main\Localization\Loc\getMessage
static getMessage($code, $replace=null, $language=null)
Definition
loc.php:29
Bitrix\Iblock\Integration\UI\Grid\Property\Type
Definition
DirectoryItemsProvider.php:3
modules
iblock
lib
Integration
UI
Grid
Property
Type
ListValuesProvider.php
Создано системой
1.10.0