Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
productpanel.php
1
<?php
2
3
namespace
Bitrix\Catalog\Grid\Panel\UI
;
4
5
use
Bitrix\Catalog\Grid\Panel\UI\Item\ChangePricesActionsItem
;
6
use
Bitrix\Main\Filter\Filter
;
7
use
Bitrix\Main\Grid\GridRequest
;
8
use
Bitrix\Main\Grid\GridResponse
;
9
use
Bitrix\Main\Grid\Panel\Panel
;
10
use
Bitrix\Main\Grid\UI\Response\GridResponseFactory
;
11
use
Bitrix\Main\Result
;
12
13
class
ProductPanel
extends
Panel
14
{
23
public
function
processRequest
(
GridRequest
$request, ?
Filter
$filter =
null
): ?
GridResponse
24
{
25
$result = parent::processRequest($request, $filter);
26
if
(isset($result))
27
{
28
return
$result;
29
}
30
31
$actionId = $request->getHttpRequest()->getPost(
'action'
);
32
if
($actionId ===
'change_price'
)
33
{
34
$action = $this->
getActionById
(ChangePricesActionsItem::getId());
35
if
(isset($action))
36
{
37
$result = $action->processRequest($request->getHttpRequest(),
false
, $filter);
38
if
($result instanceof
Result
)
39
{
40
return
(
new
GridResponseFactory
)->createFromResult($result);
41
}
42
}
43
}
44
45
return
null
;
46
}
47
}
Bitrix\Catalog\Grid\Panel\UI\Item\ChangePricesActionsItem
Definition
changepricesactionsitem.php:19
Bitrix\Catalog\Grid\Panel\UI\ProductPanel
Definition
productpanel.php:14
Bitrix\Catalog\Grid\Panel\UI\ProductPanel\processRequest
processRequest(GridRequest $request, ?Filter $filter=null)
Definition
productpanel.php:23
Bitrix\Main\Filter\Filter
Definition
filter.php:5
Bitrix\Main\Grid\Panel\Panel
Definition
panel.php:14
Bitrix\Main\Grid\Panel\Panel\getActionById
getActionById(string $id)
Definition
panel.php:61
Bitrix\Main\Grid\UI\Response\GridResponseFactory
Definition
gridresponsefactory.php:10
Bitrix\Main\ORM\Data\Result
Definition
result.php:16
Bitrix\Main\Result
Definition
result.php:14
Bitrix\Main\Grid\GridRequest
Definition
gridrequest.php:17
Bitrix\Main\Grid\GridResponse
Definition
gridresponse.php:13
Bitrix\Catalog\Grid\Panel\UI
modules
catalog
lib
grid
panel
ui
productpanel.php
Создано системой
1.10.0