1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
panel.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Main\Grid\Panel;
4
5
use Bitrix\Main\Filter\Filter;
6
use Bitrix\Main\Grid\GridRequest;
7
use Bitrix\Main\Grid\GridResponse;
8
use Bitrix\Main\Grid\Panel\Action\DataProvider;
9
use Bitrix\Main\Grid\Panel\Action\Action;
10
use Bitrix\Main\Grid\Panel\Action\GroupAction;
11
use Bitrix\Main\Grid\UI\Response\GridResponseFactory;
12
13
class
Panel
14
{
18
private
array
$actions;
22
private
array
$controls;
26
private
array
$providers;
27
31
public
function
__construct
(
DataProvider
...$providers)
32
{
33
$this->providers = [];
34
foreach
($providers as
$provider
)
35
{
36
$this->providers[] =
$provider
;
37
}
38
}
39
43
final
public
function
getActions
():
array
44
{
45
if
(!isset($this->actions))
46
{
47
$this->actions = [];
48
49
foreach
($this->providers as
$provider
)
50
{
51
foreach
(
$provider
->prepareActions() as
$action
)
52
{
53
$this->actions[$action::getId()] ??=
$action
;
54
}
55
}
56
}
57
58
return
$this->actions;
59
}
60
61
final
protected
function
getActionById
(
string
$id): ?
Action
62
{
63
if
(empty($id))
64
{
65
return
null
;
66
}
67
68
return
$this->
getActions
()[$id] ??
null
;
69
}
70
74
public
function
getControls
():
array
75
{
76
if
(!isset($this->controls))
77
{
78
$this->controls = [];
79
80
foreach
($this->providers as $extraProvider)
81
{
82
$this->controls += $extraProvider->prepareControls();
83
}
84
}
85
86
return
$this->controls;
87
}
88
97
public
function
processRequest
(
GridRequest
$request
, ?
Filter
$filter
): ?
GridResponse
98
{
99
$result
=
null
;
100
101
if
(!
check_bitrix_sessid
())
102
{
103
return
null
;
104
}
105
106
// direct actions
107
$action
= $this->
getActionById
(
108
$request->
getPanelActionId
() ??
''
109
);
110
if
(
$action
)
111
{
112
$result
=
$action
->processRequest(
113
$request
->getHttpRequest(),
114
$request
->isSelectedAllPanelRows(),
115
$filter
116
);
117
}
118
else
119
{
120
// group actions
121
$groupAction = $this->
getActionById
(GroupAction::getId());
122
if
($groupAction)
123
{
124
$result
= $groupAction->processRequest(
125
$request
->getHttpRequest(),
126
$request
->isSelectedAllPanelGroupRows(),
127
$filter
128
);
129
}
130
}
131
132
return
133
isset(
$result
)
134
? (
new
GridResponseFactory
)->createFromResult(
$result
)
135
: null
136
;
137
}
138
}
$provider
if(!Loader::includeModule('messageservice')) $provider
Определения
callback_ednaruimhpx.php:21
$request
if(!Loader::includeModule('catalog')) if(!AccessController::getCurrent() ->check(ActionDictionary::ACTION_PRICE_EDIT)) if(!check_bitrix_sessid()) $request
Определения
catalog_reindex.php:36
Bitrix\Main\Grid\Panel\Action\DataProvider
Определения
dataprovider.php:9
Bitrix\Main\Grid\Panel\Panel
Определения
panel.php:14
Bitrix\Main\Grid\Panel\Panel\getControls
getControls()
Определения
panel.php:74
Bitrix\Main\Grid\Panel\Panel\getActionById
getActionById(string $id)
Определения
panel.php:61
Bitrix\Main\Grid\Panel\Panel\__construct
__construct(DataProvider ... $providers)
Определения
panel.php:31
Bitrix\Main\Grid\Panel\Panel\processRequest
processRequest(GridRequest $request, ?Filter $filter)
Определения
panel.php:97
Bitrix\Main\Grid\Panel\Panel\getActions
getActions()
Определения
panel.php:43
Bitrix\Main\Grid\UI\Response\GridResponseFactory
Определения
gridresponsefactory.php:10
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$result
$result
Определения
get_property_values.php:14
$filter
$filter
Определения
iblock_catalog_list.php:54
Bitrix\Main\Grid\GridRequest
Определения
gridrequest.php:17
Bitrix\Main\Grid\GridRequest\getPanelActionId
getPanelActionId()
Bitrix\Main\Grid\GridResponse
Определения
gridresponse.php:13
check_bitrix_sessid
check_bitrix_sessid($varname='sessid')
Определения
tools.php:4686
Bitrix\Main\Filter
Bitrix\Main\Grid\Panel\Action
Определения
action.php:3
$action
$action
Определения
file_dialog.php:21
bitrix
modules
main
lib
grid
panel
panel.php
Создано системой
1.14.0