Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
productpanelprovider.php
1<?php
2
4
12
13Loader::requireModule('iblock');
14
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(),
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}