Skip to content

Commit bbeed47

Browse files
author
Maxim Medinskiy
committed
MAGETWO-35088: Page and Block Data and Repository Interfaces
1 parent 594b7ff commit bbeed47

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

app/code/Magento/Ui/Component/Listing.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ protected function getDataFromDataProvider(array $dataRow)
188188
public function getCollectionItems()
189189
{
190190
$items = [];
191-
$collection = $this->getDataCollection()->getResultCollection();
191+
$collection = $this->getDataCollection();
192192
foreach ($collection->getItems() as $item) {
193193
$actualFields = [];
194194
$itemsData = $this->getDataFromDataProvider($item->getData());
@@ -230,8 +230,8 @@ protected function initialConfiguration()
230230
);
231231
$this->renderContext->getStorage()->addGlobalData('dump', ['extenders' => []]);
232232

233-
$collection = $this->getDataCollection()->getResultCollection();
234-
$totalCount = $collection->getTotalCount();
233+
$collection = $this->getDataCollection();
234+
$totalCount = $collection->count();
235235
$this->renderContext->getStorage()->addDataSource(
236236
$this->getName(),
237237
[

app/code/Magento/Ui/Component/Paging.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ protected function updateDataCollection()
3737
$offset = $this->renderContext->getRequestParam('page', $defaultPage);
3838
$defaultLimit = $this->config->getData('pageSize');
3939
$size = $this->renderContext->getRequestParam('limit', $defaultLimit);
40-
$this->renderContext->getStorage()->getDataCollection($this->getParentName())->setLimit($offset, $size);
40+
$this->renderContext->getStorage()
41+
->getDataCollection($this->getParentName())
42+
->setPageSize($size)
43+
->setCurPage($offset);
4144
}
4245

4346
/**

0 commit comments

Comments
 (0)