Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
dataprovider.php
1
<?php
2
3
namespace
Bitrix\Main\Grid\Row\Action
;
4
5
use
Bitrix\Main\Grid\Row\Action\Action
;
6
use
Bitrix\Main\Grid\Settings
;
7
8
abstract
class
DataProvider
9
{
10
private
array $actions;
11
private
?
Settings
$settings;
12
16
public
function
__construct
(?
Settings
$settings =
null
)
17
{
18
$this->settings = $settings;
19
}
20
26
final
protected
function
getSettings
():
Settings
27
{
28
return
$this->settings;
29
}
30
38
final
protected
function
getActionById
(
string
$id): ?
Action
39
{
40
if
(empty($id))
41
{
42
return
null
;
43
}
44
45
if
(!isset($this->actions))
46
{
47
$this->actions = [];
48
49
foreach
($this->
prepareActions
() as $action)
50
{
51
$this->actions[$action::getId()] = $action;
52
}
53
}
54
55
return
$this->actions[$id] ??
null
;
56
}
57
61
abstract
public
function
prepareActions
(): array;
62
70
public
function
prepareControls
(array $rawFields): array
71
{
72
$result = [];
73
74
foreach
($this->
prepareActions
() as $actionsItem)
75
{
76
$actionConfig = $actionsItem->getControl($rawFields);
77
if
(isset($actionConfig))
78
{
79
$result[] = $actionConfig;
80
}
81
}
82
83
return
$result;
84
}
85
}
Bitrix\Main\Grid\Row\Action\DataProvider
Definition
dataprovider.php:9
Bitrix\Main\Grid\Row\Action\DataProvider\getActionById
getActionById(string $id)
Definition
dataprovider.php:38
Bitrix\Main\Grid\Row\Action\DataProvider\prepareActions
prepareActions()
Bitrix\Main\Grid\Row\Action\DataProvider\prepareControls
prepareControls(array $rawFields)
Definition
dataprovider.php:70
Bitrix\Main\Grid\Row\Action\DataProvider\__construct
__construct(?Settings $settings=null)
Definition
dataprovider.php:16
Bitrix\Main\Grid\Row\Action\DataProvider\getSettings
getSettings()
Definition
dataprovider.php:26
Bitrix\Main\Grid\Settings
Definition
settings.php:8
Bitrix\Main\Grid\Row\Action\Action
Definition
action.php:12
Bitrix\Main\Grid\Row\Action
Definition
action.php:3
modules
main
lib
grid
row
action
dataprovider.php
Создано системой
1.10.0