Skip to content

Commit 0e98cbf

Browse files
author
Bohdan Korablov
committed
Merge remote-tracking branch 'tango_ce/MAGETWO-28876' into MAGETWO-39602
2 parents 9b0369c + dcf1d17 commit 0e98cbf

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

app/code/Magento/Cms/Ui/Component/Listing/Column/PageActions.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,32 @@ class PageActions extends Column
2626
/** @var UrlInterface */
2727
protected $urlBuilder;
2828

29+
/**
30+
* @var string
31+
*/
32+
private $editUrl;
33+
2934
/**
3035
* @param ContextInterface $context
3136
* @param UiComponentFactory $uiComponentFactory
3237
* @param UrlBuilder $actionUrlBuilder
3338
* @param UrlInterface $urlBuilder
3439
* @param array $components
3540
* @param array $data
41+
* @param string $editUrl
3642
*/
3743
public function __construct(
3844
ContextInterface $context,
3945
UiComponentFactory $uiComponentFactory,
4046
UrlBuilder $actionUrlBuilder,
4147
UrlInterface $urlBuilder,
4248
array $components = [],
43-
array $data = []
49+
array $data = [],
50+
$editUrl = self::CMS_URL_PATH_EDIT
4451
) {
4552
$this->urlBuilder = $urlBuilder;
4653
$this->actionUrlBuilder = $actionUrlBuilder;
54+
$this->editUrl = $editUrl;
4755
parent::__construct($context, $uiComponentFactory, $components, $data);
4856
}
4957

@@ -60,7 +68,7 @@ public function prepareDataSource(array & $dataSource)
6068
$name = $this->getData('name');
6169
if (isset($item['page_id'])) {
6270
$item[$name]['edit'] = [
63-
'href' => $this->urlBuilder->getUrl(self::CMS_URL_PATH_EDIT, ['page_id' => $item['page_id']]),
71+
'href' => $this->urlBuilder->getUrl($this->editUrl, ['page_id' => $item['page_id']]),
6472
'label' => __('Edit')
6573
];
6674
$item[$name]['delete'] = [

0 commit comments

Comments
 (0)