Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
dataprovider.php
1<?php
2
4
6
14abstract class DataProvider
15{
16 private ?Settings $settings;
17
21 public function __construct(?Settings $settings = null)
22 {
23 $this->settings = $settings;
24 }
25
31 final protected function getSettings(): Settings
32 {
33 return $this->settings;
34 }
35
44 protected function createColumn(string $columnId, array $params = []): Column
45 {
46 if (!isset($params['id']))
47 {
48 $params['id'] = $columnId;
49 }
50
51 return new Column($columnId, $params);
52 }
53
61 protected function createColumns(array $columns): array
62 {
63 $result = [];
64
65 foreach ($columns as $id => $description)
66 {
67 $result[$id] = $this->createColumn($id, $description);
68 }
69
70 return $result;
71 }
72
78 abstract public function prepareColumns(): array;
79}
createColumn(string $columnId, array $params=[])
__construct(?Settings $settings=null)