Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
dataprovider.php
1
<?php
2
3
namespace
Bitrix\Main\Grid\Panel\Action
;
4
5
use
Bitrix\Main\Grid\Panel\Action\Action
;
6
use
Bitrix\Main\Grid\Settings
;
7
use
Error
;
8
9
abstract
class
DataProvider
10
{
14
private
array $actions;
15
private
Settings
$settings;
16
20
public
function
__construct
(?
Settings
$settings =
null
)
21
{
22
if
(isset($settings))
23
{
24
$this->settings = $settings;
25
}
26
}
27
35
final
protected
function
getSettings
():
Settings
36
{
37
return
$this->settings;
38
}
39
47
final
protected
function
getActionById
(
string
$id): ?
Action
48
{
49
if
(empty($id))
50
{
51
return
null
;
52
}
53
54
if
(!isset($this->actions))
55
{
56
$this->actions = [];
57
58
foreach
($this->
prepareActions
() as $action)
59
{
60
$this->actions[$action::getId()] = $action;
61
}
62
}
63
64
return
$this->actions[$id] ??
null
;
65
}
66
72
abstract
public
function
prepareActions
(): array;
73
77
public
function
prepareControls
(): array
78
{
79
$result = [];
80
81
foreach
($this->
prepareActions
() as $action)
82
{
83
$control = $action->getControl();
84
if
(isset($control))
85
{
86
$result[] = $control;
87
}
88
}
89
90
return
$result;
91
}
92
}
Bitrix\Main\Grid\Panel\Action\DataProvider
Definition
dataprovider.php:10
Bitrix\Main\Grid\Panel\Action\DataProvider\getActionById
getActionById(string $id)
Definition
dataprovider.php:47
Bitrix\Main\Grid\Panel\Action\DataProvider\prepareActions
prepareActions()
Bitrix\Main\Grid\Panel\Action\DataProvider\__construct
__construct(?Settings $settings=null)
Definition
dataprovider.php:20
Bitrix\Main\Grid\Panel\Action\DataProvider\getSettings
getSettings()
Definition
dataprovider.php:35
Bitrix\Main\Grid\Panel\Action\DataProvider\prepareControls
prepareControls()
Definition
dataprovider.php:77
Bitrix\Main\Grid\Settings
Definition
settings.php:8
Bitrix\Main\Grid\Panel\Action\Action
Definition
action.php:18
Bitrix\Main\Grid\Panel\Action
Definition
action.php:3
Bitrix\Translate\Error
trait Error
Definition
error.php:11
modules
main
lib
grid
panel
action
dataprovider.php
Создано системой
1.10.0