Skip to content

Commit e6e7547

Browse files
author
ahuininga-orisha
committed
Implement recent changes
1 parent 1d7e14e commit e6e7547

2 files changed

Lines changed: 5 additions & 11 deletions

File tree

src/Model/ResourceModel/Page/Grid/Collection.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,7 @@
44

55
namespace Emico\AttributeLanding\Model\ResourceModel\Page\Grid;
66

7-
use Magento\Framework\Data\Collection\Db\FetchStrategyInterface;
8-
use Magento\Framework\Data\Collection\EntityFactoryInterface;
9-
use Magento\Framework\DB\Adapter\AdapterInterface;
10-
use Magento\Framework\Event\ManagerInterface;
11-
use Magento\Framework\Model\ResourceModel\Db\AbstractDb;
127
use Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult;
13-
use Psr\Log\LoggerInterface;
148
use Zend_Db_Expr;
159

1610
class Collection extends SearchResult

src/Ui/Component/Listing/Column/StoreUrls.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ public function prepareDataSource(array $dataSource): array
4646
$storeNames[(int) $store->getId()] = $store->getName();
4747
}
4848

49-
foreach ($dataSource['data']['items'] as &$item) {
50-
$columnName = $this->getData('name');
51-
$raw = $item[$columnName] ?? '';
49+
$columnName = $this->getData('name');
50+
foreach (array_keys($dataSource['data']['items']) as $index) {
51+
$raw = $dataSource['data']['items'][$index][$columnName] ?? '';
5252

5353
if ($raw === '' || $raw === null) {
54-
$item[$columnName] = '';
54+
$dataSource['data']['items'][$index][$columnName] = '';
5555
continue;
5656
}
5757

@@ -67,7 +67,7 @@ public function prepareDataSource(array $dataSource): array
6767
$lines[] = sprintf('%s: %s', $storeName, $urlPath);
6868
}
6969

70-
$item[$columnName] = implode('<br/>', $lines);
70+
$dataSource['data']['items'][$index][$columnName] = implode('<br/>', $lines);
7171
}
7272

7373
return $dataSource;

0 commit comments

Comments
 (0)