Skip to content

Commit 5432546

Browse files
Yuri KovsherDooffy
authored andcommitted
MAGETWO-34122: Possibility to configure UI data provider ActionRow for CMS grid
1 parent e5a81cf commit 5432546

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

app/code/Magento/Cms/Ui/DataProvider/Block/Row/Actions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct(UrlInterface $urlBuilder)
3636
*
3737
* @param array $rowData
3838
* @param array $rowActionConfig
39-
* @return mixed
39+
* @return array
4040
*/
4141
public function getData(array $rowData, array $rowActionConfig = [])
4242
{

app/code/Magento/Cms/Ui/DataProvider/Page/Row/Actions.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,27 +44,27 @@ public function __construct(UrlBuilder $actionUrlBuilder, UrlInterface $urlBuild
4444
/**
4545
* Get data
4646
*
47-
* @param array $dataRow
48-
* @param array $data
49-
* @return mixed
47+
* @param array $rowData
48+
* @param array $rowActionConfig
49+
* @return array
5050
*/
51-
public function getData(array $dataRow, array $data = [])
51+
public function getData(array $rowData, array $rowActionConfig = [])
5252
{
5353
return [
5454
'edit' => [
5555
'href' => $this->urlBuilder->getUrl(
56-
isset($data['url_path']) ? $data['url_path'] : static::URL_PATH,
57-
['page_id' => $dataRow['page_id']]
56+
isset($rowActionConfig['url_path']) ? $rowActionConfig['url_path'] : static::URL_PATH,
57+
['page_id' => $rowData['page_id']]
5858
),
5959
'label' => __('Edit'),
6060
'hidden' => true,
6161

6262
],
6363
'preview' => [
6464
'href' => $this->actionUrlBuilder->getUrl(
65-
$dataRow['identifier'],
66-
isset($dataRow['_first_store_id']) ? $dataRow['_first_store_id'] : null,
67-
isset($dataRow['store_code']) ? $dataRow['store_code'] : null
65+
$rowData['identifier'],
66+
isset($rowData['_first_store_id']) ? $rowData['_first_store_id'] : null,
67+
isset($rowData['store_code']) ? $rowData['store_code'] : null
6868
),
6969
'label' => __('Preview'),
7070
]

0 commit comments

Comments
 (0)