Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
ListValuesProvider.php
1<?php
2
4
7
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}
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29