1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
listconfig.php
См. документацию.
1<?php
2
3namespace Bitrix\Main\Grid\Column\Editable;
4
5use Bitrix\Main\Grid\Editor\Types;
6
7class ListConfig extends Config
8{
9 private array $items;
10
15 public function __construct(string $name, array $items, string $type = Types::DROPDOWN)
16 {
17 parent::__construct($name, $type);
18
19 $this->items = $items;
20 }
21
27 private function getItemsAsDropdown(): array
28 {
29 $result = [];
30
31 foreach ($this->items as $value => $name)
32 {
33 $result[] = [
34 'VALUE' => $value,
35 'NAME' => $name,
36 ];
37 }
38
39 return $result;
40 }
41
45 public function toArray(): array
46 {
47 $result = parent::toArray();
48
49 $result['DATA'] = [
50 'ITEMS' => $this->getItemsAsDropdown(),
51 ];
52
53 return $result;
54 }
55}
__construct(string $name, array $items, string $type=Types::DROPDOWN)
Определения listconfig.php:15
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$result
Определения get_property_values.php:14
$name
Определения menu_edit.php:35