Skip to content

Commit

Permalink
Revert changes in PageActions class
Browse files Browse the repository at this point in the history
  • Loading branch information
Martyna Maciejewska committed Feb 6, 2024
1 parent 32ec3df commit 1081f08
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions Ui/Component/Listing/Column/MenuList/PageActions.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Magento\Framework\View\Element\UiComponent\ContextInterface;
use Magento\Framework\View\Element\UiComponentFactory;
use Magento\Framework\UrlInterface;
use Snowdog\Menu\Helper\MenuHelper;

/**
* Class PageActions
Expand All @@ -31,11 +30,6 @@ class PageActions extends Column
*/
private $urlBuilder;

/**
* @var MenuHelper
*/
private $menuHelper;

/**
* @param ContextInterface $context
* @param UiComponentFactory $uiComponentFactory
Expand All @@ -44,14 +38,12 @@ class PageActions extends Column
* @param array $data
*/
public function __construct(
MenuHelper $menuHelper,
ContextInterface $context,
UiComponentFactory $uiComponentFactory,
UrlInterface $urlBuilder,
array $components = [],
array $data = []
) {
$this->menuHelper = $menuHelper;
$this->urlBuilder = $urlBuilder;
parent::__construct(
$context,
Expand All @@ -65,9 +57,9 @@ public function prepareDataSource(array $dataSource): array
{
if (isset($dataSource['data']['items'])) {
foreach ($dataSource['data']['items'] as & $item) {
if (isset($item[$this->menuHelper->getLinkField()])) {
if (isset($item['menu_id'])) {
$name = $this->getData('name');
$menuId = (int) $item[$this->menuHelper->getLinkField()];
$menuId = (int) $item['menu_id'];
$isActive = (int) $item['is_active'] === 1;
$item[$name] = [
'edit' => $this->getEditButton($menuId),
Expand Down

0 comments on commit 1081f08

Please sign in to comment.