Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
productpanelprovider.php
1
<?php
2
3
namespace
Bitrix\Catalog\Grid\Panel\UI
;
4
5
use
Bitrix\Catalog\Grid\Access\ProductRightsChecker
;
6
use
Bitrix\Catalog\Grid\Panel\UI\Item\ChangePricesActionsItem
;
7
use
Bitrix\Catalog\Grid\Panel\UI\Item\EditActionsItem
;
8
use
Bitrix\Catalog\Grid\Panel\UI\Item\ProductGroupActionsItem
;
9
use
Bitrix\Iblock\Grid\Panel\UI\Actions\Item\ElementGroupActionsItem
;
10
use
Bitrix\Iblock\Grid\Panel\UI\ElementPanelProvider
;
11
use
Bitrix\Main\Loader
;
12
13
Loader::requireModule(
'iblock'
);
14
18
class
ProductPanelProvider
extends
ElementPanelProvider
19
{
20
public
function
prepareActions
(): array
21
{
22
$elementActions = parent::prepareActions();
23
24
$listMode = $this->
getListMode
();
25
26
foreach
($elementActions as &$actionItem)
27
{
28
if
($actionItem instanceof
ElementGroupActionsItem
)
29
{
30
$actionItem =
new
ProductGroupActionsItem
(
31
$this->
getIblockId
(),
32
$this->
getIblockRightsChecker
(),
33
$listMode
34
);
35
}
36
elseif ($actionItem instanceof \
Bitrix
\
Iblock
\
Grid
\
Panel
\UI\
Actions
\Item\
EditActionsItem
)
37
{
38
$actionItem =
new
EditActionsItem
($this->
getIblockId
(), $this->
getColumns
(), $this->
getIblockRightsChecker
());
39
}
40
}
41
42
if
($this->
getIblockRightsChecker
()->canEditPrices())
43
{
44
$elementActions[] =
new
ChangePricesActionsItem
($this->
getIblockId
(), $this->
getIblockRightsChecker
());
45
}
46
47
return
$elementActions;
48
}
49
}
Bitrix\Catalog\Grid\Access\ProductRightsChecker
Definition
productrightschecker.php:13
Bitrix\Catalog\Grid\Panel\UI\Item\ChangePricesActionsItem
Definition
changepricesactionsitem.php:19
Bitrix\Catalog\Grid\Panel\UI\Item\EditActionsItem
Definition
editactionsitem.php:16
Bitrix\Catalog\Grid\Panel\UI\Item\ProductGroupActionsItem
Definition
productgroupactionsitem.php:16
Bitrix\Catalog\Grid\Panel\UI\ProductPanelProvider
Definition
productpanelprovider.php:19
Bitrix\Catalog\Grid\Panel\UI\ProductPanelProvider\prepareActions
prepareActions()
Definition
productpanelprovider.php:20
Bitrix\Iblock\Grid\Panel\UI\Actions\Item\ElementGroupActionsItem
Definition
elementgroupactionsitem.php:19
Bitrix\Iblock\Grid\Panel\UI\ElementPanelProvider
Definition
elementpanelprovider.php:22
Bitrix\Iblock\Grid\Panel\UI\ElementPanelProvider\getIblockId
getIblockId()
Definition
elementpanelprovider.php:38
Bitrix\Iblock\Grid\Panel\UI\ElementPanelProvider\getColumns
getColumns()
Definition
elementpanelprovider.php:53
Bitrix\Iblock\Grid\Panel\UI\ElementPanelProvider\getListMode
getListMode()
Definition
elementpanelprovider.php:43
Bitrix\Iblock\Grid\Panel\UI\ElementPanelProvider\getIblockRightsChecker
getIblockRightsChecker()
Definition
elementpanelprovider.php:48
Bitrix\Iblock\Iblock
Definition
iblock.php:18
Bitrix\Main\Grid\Grid
Definition
grid.php:74
Bitrix\Main\Grid\Panel\Panel
Definition
panel.php:14
Bitrix\Main\Loader
Definition
loader.php:12
Bitrix\Sale\Discount\Actions
Definition
actions.php:11
Bitrix\Catalog\Grid\Panel\UI
Bitrix
modules
catalog
lib
grid
panel
ui
productpanelprovider.php
Создано системой
1.10.0