1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
dataprovider.php
См. документацию.
1<?php
2
3namespace Bitrix\Main\Grid\Panel\Action;
4
5use Bitrix\Main\Grid\Settings;
6use Error;
7
8abstract class DataProvider
9{
13 private array $actions;
14 private Settings $settings;
15
19 public function __construct(?Settings $settings = null)
20 {
21 if (isset($settings))
22 {
23 $this->settings = $settings;
24 }
25 }
26
34 final protected function getSettings(): Settings
35 {
36 return $this->settings;
37 }
38
46 final protected function getActionById(string $id): ?Action
47 {
48 if (empty($id))
49 {
50 return null;
51 }
52
53 if (!isset($this->actions))
54 {
55 $this->actions = [];
56
57 foreach ($this->prepareActions() as $action)
58 {
59 $this->actions[$action::getId()] = $action;
60 }
61 }
62
63 return $this->actions[$id] ?? null;
64 }
65
71 abstract public function prepareActions(): array;
72
76 public function prepareControls(): array
77 {
78 $result = [];
79
80 foreach ($this->prepareActions() as $action)
81 {
82 $control = $action->getControl();
83 if (isset($control))
84 {
85 $result[] = $control;
86 }
87 }
88
89 return $result;
90 }
91}
Определения error.php:15
__construct(?Settings $settings=null)
Определения dataprovider.php:19
</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
$control
Определения iblock_catalog_edit.php:61
$settings
Определения product_settings.php:43
$action
Определения file_dialog.php:21